1*** Settings ***
2Resource         ../../lib/resource.txt
3Resource         ../../lib/bmc_redfish_resource.robot
4
5*** Test Cases ***
6
7Login 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
20*** Keywords ***
21
22Login And Verify Redfish Response
23    [Documentation]  Login and verify redfish response.
24    [Arguments]  ${expected_response}  ${username}  ${password}
25
26    # Description of arguments:
27    # expected_response   Expected REST status.
28    # username            The username to be used to connect to the server.
29    # password            The password to be used to connect to the server.
30
31    ${data}=  Create Dictionary  username=${username}  password=${password}
32    Run Keyword And Expect Error  ${expected_response}  redfish.Login  ${data}
33
34