aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukasz Rajewski <lukasz.rajewski@orange.com>2020-05-13 11:36:07 +0000
committerGerrit Code Review <gerrit@onap.org>2020-05-13 11:36:07 +0000
commit6d2959df1f4b25f7e4f14cd76892182060cde5b9 (patch)
tree44769d1e5125c79c6f217c5aaa16767181038d63
parent0387b3b7a9dd64cb062bb224083a8bae28b6b042 (diff)
parent2d9492198ab10f8fd974210bc93942fe2ff21a1c (diff)
Merge "xacml-pdp csit should wait for deployment"
-rw-r--r--plans/policy/xacml-pdp/setup.sh3
-rw-r--r--tests/policy/xacml-pdp/xacml-pdp-test.robot8
2 files changed, 11 insertions, 0 deletions
diff --git a/plans/policy/xacml-pdp/setup.sh b/plans/policy/xacml-pdp/setup.sh
index faf256fa..d6726c7a 100644
--- a/plans/policy/xacml-pdp/setup.sh
+++ b/plans/policy/xacml-pdp/setup.sh
@@ -44,6 +44,8 @@ if [[ ! "$WORK_DIR" || ! -d "$WORK_DIR" ]]; then
exit 1
fi
+SCR_DMAAP=${SCRIPTS}/policy/drools-apps
+
sudo apt-get -y install libxml2-utils
bash ${SCRIPTS}/policy/policy-models-dmaap-sim.sh
@@ -81,6 +83,7 @@ echo DMAAP_IP IS ${DMAAP_IP}
DATA2=${WORKSPACE}/dmaap-sim/models/models-examples/src/main/resources/policies
ROBOT_VARIABLES=""
+ROBOT_VARIABLES="${ROBOT_VARIABLES} -v SCR_DMAAP:${SCR_DMAAP}"
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}"
diff --git a/tests/policy/xacml-pdp/xacml-pdp-test.robot b/tests/policy/xacml-pdp/xacml-pdp-test.robot
index 250e01f1..6e2fa008 100644
--- a/tests/policy/xacml-pdp/xacml-pdp-test.robot
+++ b/tests/policy/xacml-pdp/xacml-pdp-test.robot
@@ -2,6 +2,7 @@
Library Collections
Library RequestsLibrary
Library OperatingSystem
+Library Process
Library json
*** Test Cases ***
@@ -27,6 +28,11 @@ Statistics
Should Be Equal As Strings ${resp.status_code} 200
Should Be Equal As Strings ${resp.json()['code']} 200
+MakeTopics
+ [Documentation] Creates the Policy topics
+ ${result}= Run Process ${SCR_DMAAP}/make_topic.sh POLICY-PDP-PAP
+ Should Be Equal As Integers ${result.rc} 0
+
ExecuteXacmlPolicy
Wait Until Keyword Succeeds 0 min 15 sec CreateMonitorPolicy
Wait Until Keyword Succeeds 0 min 15 sec CreateOptimizationPolicy
@@ -78,6 +84,8 @@ DeployPolicies
Log Received response from policy5 ${resp.text}
${postjsonobject} To Json ${postjson}
Should Be Equal As Strings ${resp.status_code} 200
+ ${result}= Run Process ${SCR_DMAAP}/wait_topic.sh POLICY-PDP-PAP
+ ... responseTo xacml ACTIVE onap.restart.tca
GetStatisticsAfterDeployed
[Documentation] Runs Policy Xacml PDP Statistics after policy is deployed