Split user persistence after reboot test into three
Changes:
- Split Verify Redfish User Persistence After Reboot test
in three test cases for admin, operator and read-only users
- This is done to skip operator user-related test
Tested:
- Ran all the three new tests from the sandbox and they passed
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
Change-Id: Icf25562f0e2bc7a5dcfc97f270d5efd1187b8185
diff --git a/redfish/account_service/test_user_account.robot b/redfish/account_service/test_user_account.robot
index c0e69f8..b1e24e6 100644
--- a/redfish/account_service/test_user_account.robot
+++ b/redfish/account_service/test_user_account.robot
@@ -25,26 +25,51 @@
${resp} = Redfish_utils.Get Attribute /redfish/v1/AccountService ServiceEnabled
Should Be Equal As Strings ${resp} ${True}
-Verify Redfish User Persistence After Reboot
- [Documentation] Verify Redfish user persistence after reboot.
- [Tags] Verify_Redfish_User_Persistence_After_Reboot
- # Create Redfish users.
- Redfish Create User admin_user TestPwd123 Administrator ${True}
- Redfish Create User operator_user TestPwd123 Operator ${True}
- Redfish Create User readonly_user TestPwd123 ReadOnly ${True}
+
+Verify Redfish Admin User Persistence After Reboot
+ [Documentation] Verify Redfish admin user persistence after reboot.
+ [Tags] Verify_Redfish_Admin_User_Persistence_After_Reboot
+ [Setup] Run Keywords Redfish.Login AND
+ ... Redfish Create User admin_user TestPwd123 Administrator ${True}
+ [Teardown] Run Keywords Redfish.Delete /redfish/v1/AccountService/Accounts/admin_user
+ ... AND Test Teardown Execution
# Reboot BMC.
Redfish OBMC Reboot (off) stack_mode=normal
# Verify users after reboot.
Redfish Verify User admin_user TestPwd123 Administrator ${True}
+
+
+Verify Redfish Operator User Persistence After Reboot
+ [Documentation] Verify Redfish operator user persistence after reboot.
+ [Tags] Verify_Redfish_Operator_User_Persistence_After_Reboot
+ [Setup] Run Keywords Redfish.Login AND
+ ... Redfish Create User operator_user TestPwd123 Operator ${True}
+ [Teardown] Run Keywords Redfish.Delete /redfish/v1/AccountService/Accounts/operator_user
+ ... AND Test Teardown Execution
+
+ # Reboot BMC.
+ Redfish OBMC Reboot (off) stack_mode=normal
+
+ # Verify users after reboot.
Redfish Verify User operator_user TestPwd123 Operator ${True}
+
+
+Verify Redfish Readonly User Persistence After Reboot
+ [Documentation] Verify Redfish readonly user persistence after reboot.
+ [Tags] Verify_Redfish_Readonly_User_Persistence_After_Reboot
+ [Setup] Run Keywords Redfish.Login AND
+ ... Redfish Create User readonly_user TestPwd123 ReadOnly ${True}
+ [Teardown] Run Keywords Redfish.Delete /redfish/v1/AccountService/Accounts/readonly_user
+ ... AND Test Teardown Execution
+
+ # Reboot BMC.
+ Redfish OBMC Reboot (off) stack_mode=normal
+
+ # Verify users after reboot.
Redfish Verify User readonly_user TestPwd123 ReadOnly ${True}
- # Delete created users.
- Redfish.Delete /redfish/v1/AccountService/Accounts/admin_user
- Redfish.Delete /redfish/v1/AccountService/Accounts/operator_user
- Redfish.Delete /redfish/v1/AccountService/Accounts/readonly_user
Redfish Create and Verify Admin User
[Documentation] Create a Redfish user with administrator role and verify.