aboutsummaryrefslogtreecommitdiffstats
path: root/csit/pap
diff options
context:
space:
mode:
Diffstat (limited to 'csit/pap')
-rwxr-xr-xcsit/pap/plans/setup.sh6
-rw-r--r--csit/pap/tests/pap-test.robot18
2 files changed, 14 insertions, 10 deletions
diff --git a/csit/pap/plans/setup.sh b/csit/pap/plans/setup.sh
index 4f48d124..b656ef5a 100755
--- a/csit/pap/plans/setup.sh
+++ b/csit/pap/plans/setup.sh
@@ -38,7 +38,9 @@ sleep 10
unset http_proxy https_proxy
POLICY_PAP_IP=$(get-instance-ip.sh policy-pap)
+POLICY_PAP_PORT=30442
POLICY_API_IP=$(get-instance-ip.sh policy-api)
+POLICY_API_PORT=30440
MARIADB_IP=$(get-instance-ip.sh mariadb)
echo PAP IP IS "${POLICY_PAP_IP}"
@@ -46,7 +48,7 @@ echo API IP IS "${POLICY_API_IP}"
echo MARIADB IP IS "${MARIADB_IP}"
# wait for the app to start up
-"${SCRIPTS}"/wait_for_port.sh "${POLICY_PAP_IP}" 6969
+"${SCRIPTS}"/wait_for_rest.sh localhost "${POLICY_PAP_PORT}"
DATA=${WORKSPACE}/models/models-examples/src/main/resources/policies
@@ -55,5 +57,7 @@ NODETEMPLATES=${WORKSPACE}/models/models-examples/src/main/resources/nodetemplat
ROBOT_VARIABLES=""
ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PAP_IP:${POLICY_PAP_IP}"
ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_IP:${POLICY_API_IP}"
+ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PAP_PORT:${POLICY_PAP_PORT}"
+ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_PORT:${POLICY_API_PORT}"
ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DATA:${DATA}"
ROBOT_VARIABLES="${ROBOT_VARIABLES} -v NODETEMPLATES:${NODETEMPLATES}"
diff --git a/csit/pap/tests/pap-test.robot b/csit/pap/tests/pap-test.robot
index e79f6ede..c417a83f 100644
--- a/csit/pap/tests/pap-test.robot
+++ b/csit/pap/tests/pap-test.robot
@@ -9,7 +9,7 @@ Resource ${CURDIR}/../../common-library.robot
GetReq
[Arguments] ${url}
${auth}= PolicyAdminAuth
- ${resp}= PerformGetRequest ${POLICY_PAP_IP} ${url} 200 null ${auth}
+ ${resp}= PerformGetRequest ${POLICY_PAP_PORT} ${url} 200 null ${auth}
[return] ${resp}
*** Test Cases ***
@@ -41,7 +41,7 @@ Consolidated Healthcheck
Metrics
[Documentation] Verify policy pap is exporting prometheus metrics
${auth}= PolicyAdminAuth
- ${resp}= GetMetrics ${POLICY_PAP_IP} ${auth} /policy/pap/v1/
+ ${resp}= GetMetrics ${POLICY_PAP_PORT} ${auth} /policy/pap/v1/
Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/healthcheck",} 1.0
Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/components/healthcheck",} 1.0
Should Contain ${resp.text} spring_data_repository_invocations_seconds_count{exception="None",method="save",repository="PdpGroupRepository",state="SUCCESS",} 1.0
@@ -57,7 +57,7 @@ AddPdpGroup
[Documentation] Add a new PdpGroup named 'testGroup' in the policy database
${postjson}= Get file ${CURDIR}/data/create.group.request.json
${auth}= PolicyAdminAuth
- PerformPostRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/groups/batch 200 ${postjson} null ${auth}
+ PerformPostRequest ${POLICY_PAP_PORT} /policy/pap/v1/pdps/groups/batch 200 ${postjson} null ${auth}
QueryPdpGroupsBeforeActivation
[Documentation] Verify PdpGroups before activation
@@ -66,7 +66,7 @@ QueryPdpGroupsBeforeActivation
ActivatePdpGroup
[Documentation] Change the state of PdpGroup named 'testGroup' to ACTIVE
${auth}= PolicyAdminAuth
- PerformPutRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/groups/testGroup 200 state=ACTIVE ${auth}
+ PerformPutRequest ${POLICY_PAP_PORT} /policy/pap/v1/pdps/groups/testGroup 200 state=ACTIVE ${auth}
QueryPdpGroupsAfterActivation
[Documentation] Verify PdpGroups after activation
@@ -76,7 +76,7 @@ DeployPdpGroups
[Documentation] Deploy policies in PdpGroups
${postjson}= Get file ${CURDIR}/data/deploy.group.request.json
${auth}= PolicyAdminAuth
- PerformPostRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/deployments/batch 202 ${postjson} null ${auth}
+ PerformPostRequest ${POLICY_PAP_PORT} /policy/pap/v1/pdps/deployments/batch 202 ${postjson} null ${auth}
QueryPdpGroupsAfterDeploy
[Documentation] Verify PdpGroups after undeploy
@@ -93,12 +93,12 @@ QueryPolicyAuditWithMetadataSetAfterDeploy
UndeployPolicy
[Documentation] Undeploy a policy named 'onap.restart.tca' from PdpGroups
${auth}= PolicyAdminAuth
- PerformDeleteRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/policies/onap.restart.tca 202 ${auth}
+ PerformDeleteRequest ${POLICY_PAP_PORT} /policy/pap/v1/pdps/policies/onap.restart.tca 202 ${auth}
UndeployPolicyWithMetadataSet
[Documentation] Undeploy a policy named 'operational.apex.decisionMaker' from PdpGroups
${auth}= PolicyAdminAuth
- PerformDeleteRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/policies/operational.apex.decisionMaker 202 ${auth}
+ PerformDeleteRequest ${POLICY_PAP_PORT} /policy/pap/v1/pdps/policies/operational.apex.decisionMaker 202 ${auth}
QueryPdpGroupsAfterUndeploy
[Documentation] Verify PdpGroups after undeploy
@@ -116,12 +116,12 @@ QueryPolicyAuditWithMetadataSetAfterUnDeploy
DeactivatePdpGroup
[Documentation] Change the state of PdpGroup named 'testGroup' to PASSIVE
${auth}= PolicyAdminAuth
- PerformPutRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/groups/testGroup 200 state=PASSIVE ${auth}
+ PerformPutRequest ${POLICY_PAP_PORT} /policy/pap/v1/pdps/groups/testGroup 200 state=PASSIVE ${auth}
DeletePdpGroups
[Documentation] Delete the PdpGroup named 'testGroup' from policy database
${auth}= PolicyAdminAuth
- PerformDeleteRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/groups/testGroup 200 ${auth}
+ PerformDeleteRequest ${POLICY_PAP_PORT} /policy/pap/v1/pdps/groups/testGroup 200 ${auth}
QueryPdpGroupsAfterDelete
[Documentation] Verify PdpGroups after delete