blob: 285f5da78a400c60780210495d61f17900702d0a [file] [log] [blame]
George Keishing4c394012019-02-01 06:03:02 -06001*** Settings ***
2Resource ../../lib/resource.txt
3Resource ../../lib/bmc_redfish_resource.robot
4
5*** Test Cases ***
6
George Keishing5ee33d92019-02-02 12:33:25 -06007Redfish Login With Invalid Credentials
George Keishing4c394012019-02-01 06:03:02 -06008 [Documentation] Login to BMC web using invalid credential.
George Keishing5ee33d92019-02-02 12:33:25 -06009 [Tags] Redfish_Login_With_Invalid_Credentials
George Keishing4c394012019-02-01 06:03:02 -060010 [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 Keishing5ee33d92019-02-02 12:33:25 -060020Redfish Login Using Unsecured HTTP
George Keishinga8116932019-02-05 11:51:47 -060021 [Documentation] Login to BMC web through http unsecured.
George Keishing5ee33d92019-02-02 12:33:25 -060022 [Tags] Redfish_Login_Using_Unsecured_HTTP
George Keishinga8116932019-02-05 11:51:47 -060023
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 Keishing4c394012019-02-01 06:03:02 -060035*** Keywords ***
36
37Login 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}