blob: f48381b59b6bc6bd45c294635489deb647138928 [file] [log] [blame]
George Keishing3df030f2017-12-09 13:24:41 -06001*** Settings ***
2Documentation Test suite to verify if the Robot setup is ready for use.
3
Sandhya Somashekar839a0c22019-01-31 05:05:43 -06004Resource ../lib/resource.robot
George Keishing3df030f2017-12-09 13:24:41 -06005Resource ../lib/rest_client.robot
6Resource ../lib/connection_client.robot
7Resource ../lib/ipmi_client.robot
George Keishing998c16c2019-12-11 11:22:58 -06008Resource ../lib/bmc_redfish_resource.robot
George Keishing3df030f2017-12-09 13:24:41 -06009
10*** Test Cases ***
11
George Keishing998c16c2019-12-11 11:22:58 -060012Test Redfish Setup
13 [Documentation] Verify Redfish works.
George Keishing3df030f2017-12-09 13:24:41 -060014
George Keishing4eb12082022-03-11 07:44:36 -060015 Skip If ${REDFISH_SUPPORT_TRANS_STATE} == ${0}
George Keishing5ad0b022022-03-10 02:43:30 -060016 ... Skipping Redfish check, user explicitly requested for REST.
17
George Keishing998c16c2019-12-11 11:22:58 -060018 Redfish.Login
19 Redfish.Get /redfish/v1/
20 Redfish.Logout
21
22
23Test REST Setup
24 [Documentation] Verify REST works.
George Keishing3df030f2017-12-09 13:24:41 -060025
George Keishing4eb12082022-03-11 07:44:36 -060026 Skip If ${REDFISH_SUPPORT_TRANS_STATE} == ${1}
George Keishing5ad0b022022-03-10 02:43:30 -060027 ... Skipping REST check, user explicitly requested for Redfish.
28
George Keishing3df030f2017-12-09 13:24:41 -060029 # REST Connection and request.
30 Initialize OpenBMC
31 # Raw GET REST operation to verify session is established.
George Keishingfbd67002022-08-01 11:24:03 -050032 ${resp}= GET On Session openbmc /xyz/openbmc_project/ expected_status=any
George Keishing3df030f2017-12-09 13:24:41 -060033 Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
George Keishingfbd67002022-08-01 11:24:03 -050034 Log To Console \n ${resp.json()}
George Keishing3df030f2017-12-09 13:24:41 -060035
George Keishing3df030f2017-12-09 13:24:41 -060036
George Keishing998c16c2019-12-11 11:22:58 -060037Test SSH Setup
38 [Documentation] Verify SSH works.
George Keishing3df030f2017-12-09 13:24:41 -060039
Utpal Patel9a59df72023-03-21 12:43:58 -040040 ${stdout} ${stderr} ${rc}= BMC Execute Command uname -a print_out=1 print_err=1
41 IF ${rc}
42 Fail BMC SSH login failed.
43 END
George Keishing3df030f2017-12-09 13:24:41 -060044
George Keishing998c16c2019-12-11 11:22:58 -060045
46Test IPMI Setup
47 [Documentation] Verify Out-of-band works.
48
George Keishing3df030f2017-12-09 13:24:41 -060049 ${chassis_status}= Run IPMI Standard Command chassis status
50 Log To Console \n ${chassis_status}