diff options
author | liamfallon <liam.fallon@est.tech> | 2023-02-10 22:01:43 +0000 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2023-02-13 16:45:02 +0000 |
commit | f5a11b0b346df610ffa8d9857956abf113ce6765 (patch) | |
tree | cb27bb6b9e29c2d23ac313d86b4bbdfe5883a855 /csit/pap | |
parent | 600a3002192da1ba2174c63d248a46dc27414397 (diff) |
Refactor CSITs to use exposed ports
The CSITs were using the ports in the Docker environment directly. This
commit changes the CSITs to use published ports.
Issue-ID: POLICY-4533
Change-Id: I17d60c8bceae71f1bf2175dcb6addf032f14a899
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'csit/pap')
-rwxr-xr-x | csit/pap/plans/setup.sh | 6 | ||||
-rw-r--r-- | csit/pap/tests/pap-test.robot | 18 |
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 |