George Keishing | 4c39401 | 2019-02-01 06:03:02 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Resource ../../lib/resource.txt |
| 3 | Resource ../../lib/bmc_redfish_resource.robot |
| 4 | |
| 5 | *** Test Cases *** |
| 6 | |
| 7 | Login To BMCweb With Invalid Credentials |
| 8 | [Documentation] Login to BMC web using invalid credential. |
| 9 | [Tags] Login_To_BMCweb_With_Invalid_Credentials |
| 10 | [Template] Login And Verify Redfish Response |
| 11 | |
| 12 | # Expect status Username Password |
| 13 | InvalidCredentialsError* ${OPENBMC_USERNAME} deadpassword |
| 14 | InvalidCredentialsError* groot ${OPENBMC_PASSWORD} |
| 15 | InvalidCredentialsError* ${EMPTY} ${OPENBMC_PASSWORD} |
| 16 | InvalidCredentialsError* ${OPENBMC_USERNAME} ${EMPTY} |
| 17 | InvalidCredentialsError* ${EMPTY} ${EMPTY} |
| 18 | |
| 19 | |
George Keishing | a811693 | 2019-02-05 11:51:47 -0600 | [diff] [blame^] | 20 | Login To BMCweb Using Unsecured HTTP |
| 21 | [Documentation] Login to BMC web through http unsecured. |
| 22 | [Tags] Login_To_BMCweb_Using_Unsecured_HTTP |
| 23 | |
| 24 | Create Session openbmc http://${OPENBMC_HOST} |
| 25 | ${data}= Create Dictionary |
| 26 | ... UserName=${OPENBMC_USERNAME} Password=${OPENBMC_PASSWORD} |
| 27 | |
| 28 | ${headers}= Create Dictionary Content-Type=application/json |
| 29 | |
| 30 | Run Keyword And Expect Error *Connection refused* |
| 31 | ... Post Request openbmc /redfish/v1/SessionService/Sessions |
| 32 | ... data=${data} headers=${headers} |
| 33 | |
| 34 | |
George Keishing | 4c39401 | 2019-02-01 06:03:02 -0600 | [diff] [blame] | 35 | *** Keywords *** |
| 36 | |
| 37 | Login And Verify Redfish Response |
| 38 | [Documentation] Login and verify redfish response. |
| 39 | [Arguments] ${expected_response} ${username} ${password} |
| 40 | |
| 41 | # Description of arguments: |
| 42 | # expected_response Expected REST status. |
| 43 | # username The username to be used to connect to the server. |
| 44 | # password The password to be used to connect to the server. |
| 45 | |
| 46 | ${data}= Create Dictionary username=${username} password=${password} |
| 47 | Run Keyword And Expect Error ${expected_response} redfish.Login ${data} |
| 48 | |