From 9e9f7222bd9d79785bbdfefc330c6b4a4c90b6b2 Mon Sep 17 00:00:00 2001 From: ramverma Date: Mon, 11 Feb 2019 16:25:44 +0000 Subject: Create CSIT tests for policy/pap Change-Id: I0a969749b5cd77949ef1e86fd1962952b3385f88 Issue-ID: POLICY-1480 Signed-off-by: ramverma --- tests/policy/pap/pap-test.robot | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/policy/pap/pap-test.robot (limited to 'tests/policy/pap/pap-test.robot') diff --git a/tests/policy/pap/pap-test.robot b/tests/policy/pap/pap-test.robot new file mode 100644 index 00000000..7dca5b4d --- /dev/null +++ b/tests/policy/pap/pap-test.robot @@ -0,0 +1,28 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json + +*** Test Cases *** +Healthcheck + [Documentation] Runs Policy PAP Health check + ${auth}= Create List healthcheck zb!XztG34 + Log Creating session https://${POLICY_PAP_IP}:6969 + ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Get Request policy /healthcheck headers=${headers} + Log Received response from policy ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + Should Be Equal As Strings ${resp.json()['code']} 200 + +Statistics + [Documentation] Runs Policy PAP Statistics + ${auth}= Create List healthcheck zb!XztG34 + Log Creating session https://${POLICY_PAP_IP}:6969 + ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth} + ${headers}= Create Dictionary Accept=application/json Content-Type=application/json + ${resp}= Get Request policy /statistics headers=${headers} + Log Received response from policy ${resp.text} + Should Be Equal As Strings ${resp.status_code} 200 + Should Be Equal As Strings ${resp.json()['code']} 200 -- cgit 1.2.3-korg