aboutsummaryrefslogtreecommitdiffstats
path: root/tests/policy/pap/pap-test.robot
diff options
context:
space:
mode:
authorramverma <ram.krishna.verma@est.tech>2019-02-11 16:25:44 +0000
committerramverma <ram.krishna.verma@est.tech>2019-02-11 16:25:44 +0000
commit9e9f7222bd9d79785bbdfefc330c6b4a4c90b6b2 (patch)
treebdcf4dbdec41410813a77ffdf5cd7da6bd86e7a9 /tests/policy/pap/pap-test.robot
parent47abceca6dcbb8d559277d92ad9cc0f1ea806196 (diff)
Create CSIT tests for policy/pap
Change-Id: I0a969749b5cd77949ef1e86fd1962952b3385f88 Issue-ID: POLICY-1480 Signed-off-by: ramverma <ram.krishna.verma@est.tech>
Diffstat (limited to 'tests/policy/pap/pap-test.robot')
-rw-r--r--tests/policy/pap/pap-test.robot28
1 files changed, 28 insertions, 0 deletions
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