blob: 74a575cd5840d94e0f3978bdcdc5abf97dfe2635 [file] [log] [blame]
AndyWalsheb412c7b2020-02-13 15:05:21 +00001*** Settings ***
2Documentation Testing PMSH functionality
3Library OperatingSystem
4Library RequestsLibrary
5Library String
6
7Test Setup Create Session pmsh_session ${PMSH_BASE_URL}
8Test Teardown Delete All Sessions
9
10
11*** Variables ***
12${PMSH_BASE_URL} https://${PMSH_IP}:8443
13${HEALTHCHECK_ENDPOINT} /healthcheck
14
15
16*** Test Cases ***
17Verify Health Check returns 200 when a REST GET request to healthcheck url
18 [Tags] PMSH_01
19 [Documentation] Verify Health Check returns 200 when a REST GET request to healthcheck url
20 [Timeout] 1 minute
21 ${resp}= Get Request pmsh_session ${HEALTHCHECK_ENDPOINT}
22 VerifyResponse ${resp.status_code} 200
23
24Verify Health Check response includes healthy status
25 [Tags] PMSH_02
26 [Documentation] Verify Health Check response includes healthy status
27 [Timeout] 1 minute
28 ${resp}= Get Request pmsh_session ${HEALTHCHECK_ENDPOINT}
29 VerifyResponseContains ${resp.text} healthy
30
31*** Keywords ***
32VerifyResponse
33 [Arguments] ${actual_response_value} ${expected_response_value}
34 Should Be Equal As Strings ${actual_response_value} ${expected_response_value}
35
36VerifyResponseContains
37 [Arguments] ${response_content} ${string_to_check_for}
38 Should Contain ${response_content} ${string_to_check_for}