Base framework to test redfish and IPMI user combinations
Test case added:
- Create user using redfish and verify via IPMI
Change-Id: I7db547a75e913d1924c1d3b46eff535ba0a0f784
Signed-off-by: Rahul Maheshwari <rahulmaheshwari@in.ibm.com>
diff --git a/redfish/account_service/test_ipmi_redfish_user.robot b/redfish/account_service/test_ipmi_redfish_user.robot
new file mode 100644
index 0000000..011e989
--- /dev/null
+++ b/redfish/account_service/test_ipmi_redfish_user.robot
@@ -0,0 +1,52 @@
+*** Settings ***
+Documentation Test IPMI and Redfish combinations for user management.
+
+Resource ../../lib/resource.robot
+Resource ../../lib/bmc_redfish_resource.robot
+Resource ../../lib/openbmc_ffdc.robot
+Resource ../../lib/ipmi_client.robot
+
+Test Setup Test Setup Execution
+Test Teardown Test Teardown Execution
+
+
+*** Variables ***
+
+${valid_password} 0penBmc1
+
+
+** Test Cases **
+
+Create Admin Redfish User And Verify Login Via IPMI
+ [Documentation] Create user using redfish and verify via IPMI.
+ [Tags] Create_Admin_Redfish_User_And_Verify_Login_Via_IPMI
+
+ ${random_username}= Generate Random String 8 [LETTERS]
+ Set Test Variable ${random_username}
+
+ ${payload}= Create Dictionary
+ ... UserName=${random_username} Password=${valid_password}
+ ... RoleId=Administrator Enabled=${True}
+ Redfish.Post /redfish/v1/AccountService/Accounts body=&{payload}
+ ... valid_status_codes=[${HTTP_CREATED}]
+
+ Verify IPMI Username And Password ${random_username} ${valid_password}
+
+
+*** Keywords ***
+
+Test Setup Execution
+ [Documentation] Do test case setup tasks.
+
+ Redfish.Login
+
+
+Test Teardown Execution
+ [Documentation] Do the post test teardown.
+
+ FFDC On Test Case Fail
+ # Delete the test user.
+ Run Keyword And Ignore Error
+ ... Redfish.Delete /redfish/v1/AccountService/Accounts/${random_username}
+
+ Redfish.Logout