blob: 95234779a1f599eb58f5d0fa7f606df6c7bebdd4 [file] [log] [blame]
George Keishingf1331672018-01-18 05:19:02 -06001*** Settings ***
2Documentation OpenBMC user management test.
3
Sweta Potthuria659ad22018-01-31 12:24:51 -06004Resource ../lib/rest_client.robot
5Resource ../lib/openbmc_ffdc.robot
George Keishingc25c55d2018-10-30 02:23:44 -05006Resource ../lib/utils.robot
George Keishingf1331672018-01-18 05:19:02 -06007Library SSHLibrary
8
9Test Teardown Test Teardown Execution
10
11*** Variables ****
12
George Keishingcf3df712018-10-29 09:12:58 -050013${test_password} 0penBmc123
George Keishingf1331672018-01-18 05:19:02 -060014
15*** Test Cases ***
16
Sivas SRR1a7502d2018-09-19 03:31:54 -050017
18Verify At Least One User In List
19 [Documentation] Verify user list API list minimum one user.
20 [Tags] Verify_At_Least_One_User_In_List
George Keishingb24adb32018-10-29 13:20:08 -050021 [Teardown] FFDC On Test Case Fail
Sivas SRR1a7502d2018-09-19 03:31:54 -050022
23 ${bmc_user_uris}= Read Properties ${BMC_USER_URI}list
24 Should Not Be Empty ${bmc_user_uris}
25
26
George Keishingf1331672018-01-18 05:19:02 -060027Verify Root Password Update
28 [Documentation] Update system "root" user password and verify.
29 [Tags] Verify_Root_Password_Update
30
31 Delete All Sessions
32
33 Initialize OpenBMC
34 Update Root Password ${test_password}
35
36 # Time for user manager to sync.
37 Sleep 5 s
38
39 Delete All Sessions
40
41 # SSH Login to BMC with new "root" password.
42 SSHLibrary.Open Connection ${OPENBMC_HOST}
43 Login ${OPENBMC_USERNAME} ${test_password}
44
45 # REST Login to BMC with new "root" password.
George Keishingcf3df712018-10-29 09:12:58 -050046 Initialize OpenBMC REST_PASSWORD=${test_password}
George Keishingf1331672018-01-18 05:19:02 -060047
48 ${resp}= Get Request openbmc ${BMC_USER_URI}enumerate
49 Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
50 ... msg=Verify of new root password failed, RC=${resp.status_code}.
51
52
53*** Keywords ***
54
55Test Teardown Execution
56 [Documentation] Do test teardown task.
57
58 # REST Login to BMC with new "root" password.
George Keishingcf3df712018-10-29 09:12:58 -050059 Initialize OpenBMC REST_PASSWORD=${test_password}
George Keishingf1331672018-01-18 05:19:02 -060060 Update Root Password
61 Sleep 5 s
62 Delete All Sessions
63
64 # SSH Login to BMC with user default "root" password.
65 SSHLibrary.Open Connection ${OPENBMC_HOST}
66 Login ${OPENBMC_USERNAME} ${OPENBMC_PASSWORD}
67
68 # REST Login to BMC with user default "root" password.
69 Initialize OpenBMC
70
71 FFDC On Test Case Fail
72 Close All Connections