aboutsummaryrefslogtreecommitdiffstats
path: root/tests/policy/pap
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-12-09 09:56:39 -0500
committerJim Hahn <jrh3@att.com>2019-12-10 12:24:10 -0500
commit25721ec832121ddb27f00e76f2673ac1089f3e20 (patch)
treecd6355032bec6e84833ad6dc1c9283f8a3fbd84c /tests/policy/pap
parent00c2b7e3b22215555d640d7fba959a1390512abb (diff)
Update CSITs for policy delta API
Issue-ID: POLICY-2284 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I85c613cd6f26dbccbca2ffc6173f4955ab890ce2
Diffstat (limited to 'tests/policy/pap')
-rw-r--r--tests/policy/pap/data/create.group.request.json7
-rw-r--r--tests/policy/pap/data/deploy.group.request.json19
-rw-r--r--tests/policy/pap/pap-test.robot13
3 files changed, 32 insertions, 7 deletions
diff --git a/tests/policy/pap/data/create.group.request.json b/tests/policy/pap/data/create.group.request.json
index b0937f7f..ea04c0e5 100644
--- a/tests/policy/pap/data/create.group.request.json
+++ b/tests/policy/pap/data/create.group.request.json
@@ -17,12 +17,7 @@
"version": "1.0.0"
}
],
- "policies": [
- {
- "name": "onap.restart.tca",
- "version": "1.0.0"
- }
- ]
+ "policies": []
},
{
"pdpType": "pdpTypeB",
diff --git a/tests/policy/pap/data/deploy.group.request.json b/tests/policy/pap/data/deploy.group.request.json
new file mode 100644
index 00000000..7f3694de
--- /dev/null
+++ b/tests/policy/pap/data/deploy.group.request.json
@@ -0,0 +1,19 @@
+{
+ "groups": [
+ {
+ "name": "create.group.request",
+ "deploymentSubgroups": [
+ {
+ "pdpType": "pdpTypeA",
+ "action": "POST",
+ "policies": [
+ {
+ "name": "onap.restart.tca",
+ "version": "1.0.0"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/tests/policy/pap/pap-test.robot b/tests/policy/pap/pap-test.robot
index f2dd61da..36b593c7 100644
--- a/tests/policy/pap/pap-test.robot
+++ b/tests/policy/pap/pap-test.robot
@@ -34,7 +34,7 @@ CreatePdpGroups
${postjson}= Get file ${CURDIR}/data/create.group.request.json
${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth}
${headers}= Create Dictionary Accept=application/json Content-Type=application/json
- ${resp}= Post Request policy /policy/pap/v1/pdps data=${postjson} headers=${headers}
+ ${resp}= Post Request policy /policy/pap/v1/pdps/groups/batch data=${postjson} headers=${headers}
Log Received response from policy ${resp.text}
Should Be Equal As Strings ${resp.status_code} 200
@@ -61,6 +61,17 @@ QueryPdpGroups
Should Be Equal As Strings ${resp.json()['groups'][0]['pdpGroupState']} ACTIVE
Should Be Equal As Strings ${resp.json()['groups'][1]['name']} defaultGroup
+DeployPdpGroups
+ [Documentation] Runs Policy PAP Deploy Policies to PDP Groups
+ ${auth}= Create List healthcheck zb!XztG34
+ Log Creating session https://${POLICY_PAP_IP}:6969
+ ${postjson}= Get file ${CURDIR}/data/deploy.group.request.json
+ ${session}= Create Session policy https://${POLICY_PAP_IP}:6969 auth=${auth}
+ ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
+ ${resp}= Post Request policy /policy/pap/v1/pdps/deployments/batch data=${postjson} headers=${headers}
+ Log Received response from policy ${resp.text}
+ Should Be Equal As Strings ${resp.status_code} 200
+
UndeployPolicy
[Documentation] Runs Policy PAP Undeploy a Policy from PDP Groups
${auth}= Create List healthcheck zb!XztG34