Fix for FRU related test case
Changes:
- URI changes for Power supplies
- For loop to get all redfish components
- FRU component variable name changes
Tested:
- Ran test suite from sandbox successfully.
Signed-off-by: srichn28 <srichn28@in.ibm.com>
Change-Id: I7837c80762eaba4ffb9d50b59b08859c3e322f93
diff --git a/ipmi/test_ipmi_fru.robot b/ipmi/test_ipmi_fru.robot
index 59caa2f..6c50750 100644
--- a/ipmi/test_ipmi_fru.robot
+++ b/ipmi/test_ipmi_fru.robot
@@ -12,7 +12,7 @@
*** Variables ***
-&{ipmi_redfish_fru_field_map} board_serial=SerialNumber board_part_number=PartNumber
+&{ipmi_redfish_fru_field_map} product_serial=SerialNumber product_part_number=PartNumber
*** Test Cases ***
@@ -25,10 +25,13 @@
... ${fru_objs}
# Redfish FRU info.
- ${redfish_power_details}= Redfish.Get Properties /redfish/v1/Chassis/${CHASSIS_ID}/Power
- ${redfish_power_supply_reading}= Set Variable ${redfish_power_details['PowerSupplies']}
-
- Verify IPMI and Redfish subcomponents ${redfish_power_supply_reading}
+ ${redfish_power_details}= Redfish.Get Members List /redfish/v1/Chassis/${CHASSIS_ID}/PowerSubsystem/PowerSupplies
+ ${redfish_power_dict}= Create List
+ FOR ${power_supply} IN @{redfish_power_details}
+ ${redfish_power_supply_reading}= Redfish.Get Properties ${power_supply}
+ Append To List ${redfish_power_dict} ${redfish_power_supply_reading}
+ END
+ Verify IPMI and Redfish subcomponents ${redfish_power_dict}
... ${ipmi_fru_component_info}
*** Keywords ***
@@ -87,7 +90,8 @@
Suite Setup Execution
[Documentation] Do test setup initialization.
- ${fru_objs}= Get Fru Info
+ ${status} ${fru_objs}= Run Keyword And Ignore Error Get Fru Info
+ Log To Console FRU: ${fru_objs}
Set Suite Variable ${fru_objs}
Redfish.Login
@@ -101,4 +105,4 @@
Test Teardown Execution
[Documentation] Do the post test teardown.
- FFDC On Test Case Fail
\ No newline at end of file
+ FFDC On Test Case Fail