Migrate set asset tag test to Redfish
Change-Id: Iacc57c3ac299c6ac123bb6aafc225ed6c60bd86e
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/ipmi/test_ipmi_asset_tag.robot b/ipmi/test_ipmi_asset_tag.robot
index 8947f2c..eacaae3 100644
--- a/ipmi/test_ipmi_asset_tag.robot
+++ b/ipmi/test_ipmi_asset_tag.robot
@@ -3,9 +3,13 @@
Documentation Module to test IPMI asset tag functionality.
Resource ../lib/ipmi_client.robot
Resource ../lib/openbmc_ffdc.robot
+Library ../lib/gen_robot_valid.py
+Suite Setup Redfish.Login
+Suite Teardown Redfish.Logout
Test Teardown FFDC On Test Case Fail
+
*** Test Cases ***
Set Asset Tag With Valid String Length
@@ -28,3 +32,14 @@
${resp}= Run Keyword And Expect Error * Run IPMI Standard Command
... dcmi set_asset_tag ${random_string}
Should Contain ${resp} Parameter out of range ignore_case=True
+
+
+Set Asset Tag With IPMI And Verify With Redfish
+ [Documentation] Set valid asset tag via IPMI and verify using Redfish.
+ [Tags] Set_Asset_Tag_With_IPMI_And_Verify_With_Redfish
+
+ ${random_string}= Generate Random String 63
+ Run Keyword Run IPMI Standard Command dcmi set_asset_tag ${random_string}
+
+ ${asset_tag}= Redfish.Get Attribute ${SYSTEM_BASE_URI} AssetTag
+ Valid Value asset_tag ['${random_string}']
diff --git a/tests/ipmi/test_general_ipmi.robot b/tests/ipmi/test_general_ipmi.robot
index 9ce0e4c..676d0e8 100755
--- a/tests/ipmi/test_general_ipmi.robot
+++ b/tests/ipmi/test_general_ipmi.robot
@@ -21,20 +21,6 @@
*** Test Cases ***
-Set Asset Tag With Valid String Length Via REST
- [Documentation] Set valid asset tag via REST and verify.
- [Tags] Set_Asset_Tag_With_Valid_String_Length_Via_REST
-
- ${random_string}= Generate Random String 63
- ${args}= Create Dictionary data=${random_string}
- Write Attribute /xyz/openbmc_project/inventory/system AssetTag
- ... data=${args}
-
- ${asset_tag}= Read Attribute /xyz/openbmc_project/inventory/system
- ... AssetTag
- Should Be Equal As Strings ${asset_tag} ${random_string}
-
-
Verify Chassis Identify via IPMI
[Documentation] Verify "chassis identify" using IPMI command.
[Tags] Verify_Chassis_Identify_via_IPMI