George Keishing | eaa73b7 | 2018-07-30 09:30:16 -0500 | [diff] [blame^] | 1 | *** Settings *** |
| 2 | Documentation Test Redfish interfaces supported. |
| 3 | |
| 4 | Resource ../lib/redfish_client.robot |
| 5 | |
| 6 | ** Test Cases ** |
| 7 | |
| 8 | Get Redfish Response Codes |
| 9 | [Documentation] Get Redfish response codes and validate them. |
| 10 | [Tags] Get_Redfish_Response_Codes |
| 11 | [Template] Execute Get And Check Response |
| 12 | |
| 13 | # Expected status URL Path |
| 14 | ${HTTP_OK} Systems |
| 15 | ${HTTP_OK} Systems/motherboard |
| 16 | ${HTTP_OK} Chassis/system |
| 17 | ${HTTP_OK} Managers/openbmc/EthernetInterfaces/eth0 |
| 18 | ${HTTP_NOT_FOUND} /i/dont/exist/ |
| 19 | |
| 20 | *** Keywords *** |
| 21 | |
| 22 | Execute Get And Check Response |
| 23 | [Documentation] Execute "GET" request and check for expected status. |
| 24 | [Arguments] ${expected_response_code} ${url_path} |
| 25 | # Description of argument(s): |
| 26 | # expected_response_code Expected REST status codes. |
| 27 | # url_path URL path. |
| 28 | |
| 29 | ${resp} = Redfish Get Request ${url_path} response_format=${0} |
| 30 | Should Be Equal As Strings ${resp.status_code} ${expected_response_code} |