George Keishing | f133167 | 2018-01-18 05:19:02 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation OpenBMC user management test. |
| 3 | |
Sweta Potthuri | a659ad2 | 2018-01-31 12:24:51 -0600 | [diff] [blame] | 4 | Resource ../lib/rest_client.robot |
| 5 | Resource ../lib/openbmc_ffdc.robot |
George Keishing | c25c55d | 2018-10-30 02:23:44 -0500 | [diff] [blame^] | 6 | Resource ../lib/utils.robot |
George Keishing | f133167 | 2018-01-18 05:19:02 -0600 | [diff] [blame] | 7 | Library SSHLibrary |
| 8 | |
| 9 | Test Teardown Test Teardown Execution |
| 10 | |
| 11 | *** Variables **** |
| 12 | |
George Keishing | cf3df71 | 2018-10-29 09:12:58 -0500 | [diff] [blame] | 13 | ${test_password} 0penBmc123 |
George Keishing | f133167 | 2018-01-18 05:19:02 -0600 | [diff] [blame] | 14 | |
| 15 | *** Test Cases *** |
| 16 | |
Sivas SRR | 1a7502d | 2018-09-19 03:31:54 -0500 | [diff] [blame] | 17 | |
| 18 | Verify 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 Keishing | b24adb3 | 2018-10-29 13:20:08 -0500 | [diff] [blame] | 21 | [Teardown] FFDC On Test Case Fail |
Sivas SRR | 1a7502d | 2018-09-19 03:31:54 -0500 | [diff] [blame] | 22 | |
| 23 | ${bmc_user_uris}= Read Properties ${BMC_USER_URI}list |
| 24 | Should Not Be Empty ${bmc_user_uris} |
| 25 | |
| 26 | |
George Keishing | f133167 | 2018-01-18 05:19:02 -0600 | [diff] [blame] | 27 | Verify 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 Keishing | cf3df71 | 2018-10-29 09:12:58 -0500 | [diff] [blame] | 46 | Initialize OpenBMC REST_PASSWORD=${test_password} |
George Keishing | f133167 | 2018-01-18 05:19:02 -0600 | [diff] [blame] | 47 | |
| 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 | |
| 55 | Test Teardown Execution |
| 56 | [Documentation] Do test teardown task. |
| 57 | |
| 58 | # REST Login to BMC with new "root" password. |
George Keishing | cf3df71 | 2018-10-29 09:12:58 -0500 | [diff] [blame] | 59 | Initialize OpenBMC REST_PASSWORD=${test_password} |
George Keishing | f133167 | 2018-01-18 05:19:02 -0600 | [diff] [blame] | 60 | 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 |