blob: d187d8fc57306ec3ff16409bdcc6b21cc354e569 [file] [log] [blame]
ramverma9e9f7222019-02-11 16:25:44 +00001*** Settings ***
2Library Collections
3Library RequestsLibrary
4Library OperatingSystem
5Library json
6
7*** Test Cases ***
8Healthcheck
9 [Documentation] Runs Policy PAP Health check
10 ${auth}= Create List healthcheck zb!XztG34
11 Log Creating session https://${POLICY_PAP_IP}:6969
12 ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth}
13 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
ramverma55c1fcf2019-02-22 14:08:15 +000014 ${resp}= Get Request policy /policy/pap/v1/healthcheck headers=${headers}
ramverma9e9f7222019-02-11 16:25:44 +000015 Log Received response from policy ${resp.text}
16 Should Be Equal As Strings ${resp.status_code} 200
17 Should Be Equal As Strings ${resp.json()['code']} 200
18
19Statistics
20 [Documentation] Runs Policy PAP Statistics
21 ${auth}= Create List healthcheck zb!XztG34
22 Log Creating session https://${POLICY_PAP_IP}:6969
23 ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth}
24 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
ramverma55c1fcf2019-02-22 14:08:15 +000025 ${resp}= Get Request policy /policy/pap/v1/statistics headers=${headers}
ramverma9e9f7222019-02-11 16:25:44 +000026 Log Received response from policy ${resp.text}
27 Should Be Equal As Strings ${resp.status_code} 200
28 Should Be Equal As Strings ${resp.json()['code']} 200