3 Library RequestsLibrary
4 Library OperatingSystem
9 [Documentation] Runs Policy Distribution Health check
10 ${auth}= Create List healthcheck zb!XztG34
11 Log Creating session https://${POLICY_DISTRIBUTION_IP}:6969
12 ${session}= Create Session policy https://${POLICY_DISTRIBUTION_IP}:6969 auth=${auth}
13 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
14 ${resp}= Get Request policy /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
19 [Documentation] Runs Policy Distribution Statistics
20 ${auth}= Create List healthcheck zb!XztG34
21 Log Creating session https://${POLICY_DISTRIBUTION_IP}:6969
22 ${session}= Create Session policy https://${POLICY_DISTRIBUTION_IP}:6969 auth=${auth}
23 ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
24 ${resp}= Get Request policy /statistics headers=${headers}
25 Log Received response from policy ${resp.text}
26 Should Be Equal As Strings ${resp.status_code} 200
27 Should Be Equal As Strings ${resp.json()['code']} 200