blob: 1a626c030c1aaf6256913b7a6959548fb21b08c8 [file] [log] [blame]
Michael Mokry88f4d472019-03-04 12:00:05 -06001*** Settings ***
2Library Collections
3Library RequestsLibrary
4Library OperatingSystem
5Library json
6
7*** Test Cases ***
8Healthcheck
9 [Documentation] Runs Policy Xacml PDP Health check
10 ${auth}= Create List healthcheck zb!XztG34
Michael Mokryed8bae52019-03-12 15:10:53 -050011 Log Creating session https://${POLICY_PDPX_IP}:6969
12 ${session}= Create Session policy https://${POLICY_PDPX_IP}:6969 auth=${auth}
Michael Mokry88f4d472019-03-04 12:00:05 -060013 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
14 ${resp}= Get Request policy /policy/pdpx/v1/healthcheck headers=${headers}
15 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 Xacml PDP Statistics
21 ${auth}= Create List healthcheck zb!XztG34
Michael Mokryed8bae52019-03-12 15:10:53 -050022 Log Creating session https://${POLICY_PDPX_IP}:6969
23 ${session}= Create Session policy https://${POLICY_PDPX_IP}:6969 auth=${auth}
Michael Mokry88f4d472019-03-04 12:00:05 -060024 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
25 ${resp}= Get Request policy /policy/pdpx/v1/statistics headers=${headers}
26 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