Added test case to verify redfish software hex id
Change-Id: Ic984d8870b7e6c69f9876f2db2fa64ad853ad2e5
Signed-off-by: Sushil Singh <susilsi7@in.ibm.com>
diff --git a/redfish/update_service/test_firmware_inventory.robot b/redfish/update_service/test_firmware_inventory.robot
index aef0b91..d405e13 100644
--- a/redfish/update_service/test_firmware_inventory.robot
+++ b/redfish/update_service/test_firmware_inventory.robot
@@ -4,6 +4,7 @@
Resource ../../lib/resource.robot
Resource ../../lib/bmc_redfish_resource.robot
Resource ../../lib/openbmc_ffdc.robot
+Resource ../../lib/redfish_code_update_utils.robot
Library ../../lib/gen_robot_valid.py
Test Setup Test Setup Execution
@@ -128,6 +129,20 @@
... valid_values=['/redfish/v1/UpdateService/Actions/UpdateService.SimpleUpdate']
+Verify Redfish Software Hex ID
+ [Documentation] Verify BMC images have valid 8-digit hex IDs.
+ [Tags] Verify_Redfish_Software_Hex_ID
+
+ ${sw_inv_dict}= Get Software Inventory State
+
+ FOR ${id_key} IN @{sw_inv_dict}
+ ${sw_inv}= Get From Dictionary ${sw_inv_dict} ${id_key}
+ Should Be Equal As Strings ${id_key} ${sw_inv['image_id']}
+ Length Should Be ${sw_inv['image_id']} ${8}
+ Should Match Regexp ${sw_inv['image_id']} [0-9a-f]*
+ END
+
+
Verify Redfish BIOS Version
[Documentation] Get host firmware version from system inventory.
[Tags] Verify_Redfish_BIOS_Version