Update CSIT to check for 202 response during PAP Deployment 64/118064/3
authora.sreekumar <ajith.sreekumar@bell.ca>
Thu, 18 Feb 2021 16:24:58 +0000 (16:24 +0000)
committerJim Hahn <jrh3@att.com>
Thu, 18 Feb 2021 21:17:21 +0000 (16:17 -0500)
Xacml pdp-type is now configurable - added it to the config file.

Change-Id: I026f62efb8eb07b4e4ca42cf34f8ca2af9662df6
Issue-ID: POLICY-2526
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Signed-off-by: Jim Hahn <jrh3@att.com>
plans/policy/xacml-pdp/setup.sh
scripts/policy/config/xacml-pdp/defaultConfig.json
tests/policy/apex-pdp/apex-pdp-test.robot
tests/policy/drools-applications/drools-applications-test.robot
tests/policy/pap/pap-test.robot
tests/policy/xacml-pdp/xacml-pdp-test.robot

index 7f557d1..6842e63 100644 (file)
@@ -1,6 +1,6 @@
 #!/bin/bash
 # ============LICENSE_START=======================================================
-#  Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+#  Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -39,14 +39,16 @@ unset http_proxy https_proxy
 POLICY_API_IP=`get-instance-ip.sh policy-api`
 MARIADB_IP=`get-instance-ip.sh mariadb`
 POLICY_PDPX_IP=`get-instance-ip.sh policy-xacml-pdp`
-DMAAP_IP=`get-instance-ip.sh policy.api.simpledemo.onap.org`
+SIM_IP=`get-instance-ip.sh policy.api.simpledemo.onap.org`
 POLICY_PAP_IP=`get-instance-ip.sh policy-pap`
 
+export SIM_IP
+
 echo PDP IP IS ${POLICY_PDPX_IP}
 echo API IP IS ${POLICY_API_IP}
 echo PAP IP IS ${POLICY_PAP_IP}
 echo MARIADB IP IS ${MARIADB_IP}
-echo DMAAP_IP IS ${DMAAP_IP}
+echo SIM_IP IS ${SIM_IP}
 
 # wait for the app to start up
 ${SCRIPTS}/policy/wait_for_port.sh ${POLICY_PDPX_IP} 6969
@@ -59,3 +61,4 @@ ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DATA2:${DATA2}"
 ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PDPX_IP:${POLICY_PDPX_IP}"
 ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_IP:${POLICY_API_IP}"
 ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PAP_IP:${POLICY_PAP_IP}"
+ROBOT_VARIABLES="${ROBOT_VARIABLES} -v SIM_IP:${SIM_IP}"
index 5a6573a..f489919 100644 (file)
@@ -1,6 +1,7 @@
 {
     "name": "XacmlPdpParameters",
     "pdpGroup": "defaultGroup",
+    "pdpType": "xacml",
     "restServerParameters": {
         "host": "0.0.0.0",
         "port": 6969,
index 9fdbc12..54838a3 100644 (file)
@@ -48,7 +48,7 @@ DeployPolicy
      ${resp}=   Post Request   policy  /policy/pap/v1/pdps/deployments/batch  data=${postjson}   headers=${headers}
      Log    Received response from policy5 ${resp.text}
      ${postjsonobject}   To Json    ${postjson}
-     Should Be Equal As Strings    ${resp.status_code}     200
+     Should Be Equal As Strings    ${resp.status_code}     202
 
 RunEventOnApexEngine
     Create Session   apexSession  http://${APEX_IP}:23324   max_retries=1
index 0b73ccf..2ab0581 100644 (file)
@@ -122,7 +122,7 @@ DeployXacmlPolicies
     ${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 pap ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}     200
+    Should Be Equal As Strings    ${resp.status_code}     202
     ${result}=     Run Process        ${SCR2}/wait_topic.sh     POLICY-PDP-PAP
     ...            responseTo    xacml    ACTIVE    restart
     Log    Received status ${result.stdout}
@@ -140,7 +140,7 @@ DeployDroolsPolicies
     ${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 pap ${resp.text}
-    Should Be Equal As Strings    ${resp.status_code}     200
+    Should Be Equal As Strings    ${resp.status_code}     202
     ${result}=     Run Process        ${SCR2}/wait_topic.sh     POLICY-PDP-PAP
     ...            responseTo    drools    ACTIVE
     Log    Received status ${result.stdout}
index 3e8bc21..d0837fa 100644 (file)
@@ -81,7 +81,7 @@ DeployPdpGroups
      ${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
+     Should Be Equal As Strings    ${resp.status_code}     202
 
 UndeployPolicy
      [Documentation]    Runs Policy PAP Undeploy a Policy from PDP Groups
@@ -91,7 +91,7 @@ UndeployPolicy
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
      ${resp}=   Delete Request     policy  /policy/pap/v1/pdps/policies/onap.restart.tca     headers=${headers}
      Log    Received response from policy ${resp.text}
-     Should Be Equal As Strings    ${resp.status_code}     200
+     Should Be Equal As Strings    ${resp.status_code}     202
 
 QueryPdpGroupsAfterUndeploy
      [Documentation]    Runs Policy PAP Query PDP Groups after Undeploy
index 150c97e..03b0ca7 100644 (file)
@@ -83,7 +83,7 @@ DeployPolicies
      ${resp}=   Post Request   policy  /policy/pap/v1/pdps/policies  data=${postjson}   headers=${headers}
      Log    Received response from policy5 ${resp.text}
      ${postjsonobject}   To Json    ${postjson}
-     Should Be Equal As Strings    ${resp.status_code}     200
+     Should Be Equal As Strings    ${resp.status_code}     202
      ${result}=     Run Process    ${SCR_DMAAP}/wait_topic.sh    POLICY-PDP-PAP
      ...            responseTo    xacml    ACTIVE    onap.restart.tca
 
@@ -202,7 +202,7 @@ UndeployMonitorPolicy
      ${headers}=  Create Dictionary     Accept=application/json    Content-Type=application/json
      ${resp}=   Delete Request     policy  /policy/pap/v1/pdps/policies/onap.restart.tca     headers=${headers}
      Log    Received response from policy ${resp.text}
-     Should Be Equal As Strings    ${resp.status_code}     200
+     Should Be Equal As Strings    ${resp.status_code}     202
 
 GetStatisticsAfterUndeploy
      [Documentation]    Runs Policy Xacml PDP Statistics after policy is undeployed