From 8b5d53a1f92604d1333c45ca860c9e8bb11dd298 Mon Sep 17 00:00:00 2001 From: George Keishing Date: Mon, 8 Aug 2022 06:39:17 -0500 Subject: [PATCH] Add test for BIOS Post codes Changes: - Added test cases for Host reboot and host poweroff Tested: Ran successfully redfish/systems/LogServices/test_post_codes.robot Change-Id: Icff9eb93225ea0de5113adff14a439cafade8c7a Signed-off-by: George Keishing --- .../systems/LogServices/test_post_codes.robot | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/redfish/systems/LogServices/test_post_codes.robot b/redfish/systems/LogServices/test_post_codes.robot index 4a432d6a8e..e504851707 100644 --- a/redfish/systems/LogServices/test_post_codes.robot +++ b/redfish/systems/LogServices/test_post_codes.robot @@ -27,6 +27,42 @@ Test PostCodes When Host Boots Should Be True ${post_codes['Members@odata.count']} >= 1 msg=No BIOS POST Codes populated. +Test PostCodes When Host Reboot + [Documentation] Initiate Host reboot the system and verify PostCodes from host are logged. + [Tags] Test_PostCodes_When_Host_Reboot + + # Boot to runtime and clear post codes. + Redfish Power On stack_mode=skip + Redfish Clear PostCodes + + RF SYS GracefulRestart + ${post_code_list}= Redfish Get PostCodes + Rprint Vars post_code_list + + ${post_codes}= Redfish.Get Properties + ... /redfish/v1/Systems/system/LogServices/PostCodes/Entries + Log To Console BIOS POST Codes count: ${post_codes['Members@odata.count']} + Should Be True ${post_codes['Members@odata.count']} >= 1 msg=No BIOS POST Codes populated. + + +Test PostCodes When Host Powered Off + [Documentation] Power off the system and verify PostCodes from host are logged. + [Tags] Test_PostCodes_When_Host_Powered_Off + + # Boot to runtime and clear post codes. + Redfish Power On stack_mode=skip + Redfish Clear PostCodes + + Redfish Power Off + ${post_code_list}= Redfish Get PostCodes + Rprint Vars post_code_list + + ${post_codes}= Redfish.Get Properties + ... /redfish/v1/Systems/system/LogServices/PostCodes/Entries + Log To Console BIOS POST Codes count: ${post_codes['Members@odata.count']} + Should Be True ${post_codes['Members@odata.count']} >= 1 msg=No BIOS POST Codes populated. + + *** Keywords *** Test Setup Execution