aboutsummaryrefslogtreecommitdiffstats
path: root/csit/pap/tests
diff options
context:
space:
mode:
authorRam Krishna Verma <ram_krishna.verma@bell.ca>2021-07-29 18:09:58 -0400
committerRam Krishna Verma <ram_krishna.verma@bell.ca>2021-07-29 18:10:05 -0400
commitcfe6854e21999cf5fcb1b6ed6586323ce5c389ce (patch)
tree4a7b1752be7479f1b86ce09d2875e6b6ffca0879 /csit/pap/tests
parentee879f853121d92816945f0f6d0486af67a84439 (diff)
Add policy audit to pap csit
Adding policy audit api's to pap csit. However, I see that pap csit file can be refactored and lot of duplications can be removed. Will do it as part of next review. Issue-ID: POLICY-3340 Change-Id: I4334ad957ae70c4bcc9f3aa18d882042ce96d57f Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Diffstat (limited to 'csit/pap/tests')
-rw-r--r--csit/pap/tests/pap-test.robot32
1 files changed, 32 insertions, 0 deletions
diff --git a/csit/pap/tests/pap-test.robot b/csit/pap/tests/pap-test.robot
index da0908d6..f31f2426 100644
--- a/csit/pap/tests/pap-test.robot
+++ b/csit/pap/tests/pap-test.robot
@@ -83,6 +83,22 @@ DeployPdpGroups
Log Received response from policy ${resp.text}
Should Be Equal As Strings ${resp.status_code} 202
+QueryPolicyAuditAfterDeploy
+ [Documentation] Runs Policy PAP Query Policy Audit after Deploy
+ ${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 On Session policy /policy/pap/v1/policies/audit params=recordCount=1 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()[0]['pdpGroup']} create.group.request
+ Should Be Equal As Strings ${resp.json()[0]['pdpType']} pdpTypeA
+ Should Be Equal As Strings ${resp.json()[0]['policy']['name']} onap.restart.tca
+ Should Be Equal As Strings ${resp.json()[0]['policy']['version']} 1.0.0
+ Should Be Equal As Strings ${resp.json()[0]['action']} DEPLOYMENT
+ Should Be Equal As Strings ${resp.json()[0]['user']} healthcheck
+
UndeployPolicy
[Documentation] Runs Policy PAP Undeploy a Policy from PDP Groups
${auth}= Create List healthcheck zb!XztG34
@@ -105,6 +121,22 @@ QueryPdpGroupsAfterUndeploy
Should Be Equal As Strings ${resp.json()['groups'][0]['name']} create.group.request
Should Be Equal As Strings ${resp.json()['groups'][0]['pdpSubgroups'][0]['policies']} []
+QueryPolicyAuditAfterUnDeploy
+ [Documentation] Runs Policy PAP Query Policy Audit after Undeploy
+ ${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 On Session policy /policy/pap/v1/policies/audit params=recordCount=1 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()[0]['pdpGroup']} create.group.request
+ Should Be Equal As Strings ${resp.json()[0]['pdpType']} pdpTypeA
+ Should Be Equal As Strings ${resp.json()[0]['policy']['name']} onap.restart.tca
+ Should Be Equal As Strings ${resp.json()[0]['policy']['version']} 1.0.0
+ Should Be Equal As Strings ${resp.json()[0]['action']} UNDEPLOYMENT
+ Should Be Equal As Strings ${resp.json()[0]['user']} healthcheck
+
DeactivatePdpGroup
[Documentation] Runs Policy PAP Change PDP Group State to PASSIVE
${auth}= Create List healthcheck zb!XztG34