diff options
Diffstat (limited to 'csit/xacml-pdp')
-rwxr-xr-x | csit/xacml-pdp/plans/setup.sh | 10 | ||||
-rw-r--r-- | csit/xacml-pdp/tests/xacml-pdp-test.robot | 8 |
2 files changed, 12 insertions, 6 deletions
diff --git a/csit/xacml-pdp/plans/setup.sh b/csit/xacml-pdp/plans/setup.sh index 705c8202..646605ff 100755 --- a/csit/xacml-pdp/plans/setup.sh +++ b/csit/xacml-pdp/plans/setup.sh @@ -1,7 +1,7 @@ #!/bin/bash # ============LICENSE_START======================================================= # Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. -# Modifications Copyright 2021-2022 Nordix Foundation. +# Modifications Copyright 2021-2023 Nordix Foundation. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -33,10 +33,13 @@ docker-compose -f "${SCRIPTS}"/docker-compose-all.yml up -d xacml-pdp unset http_proxy https_proxy POLICY_API_IP=$(get-instance-ip.sh policy-api) +POLICY_API_PORT=30440 MARIADB_IP=$(get-instance-ip.sh mariadb) POLICY_PDPX_IP=$(get-instance-ip.sh policy-xacml-pdp) +POLICY_PDPX_PORT=30441 SIM_IP=$(get-instance-ip.sh simulator) POLICY_PAP_IP=$(get-instance-ip.sh policy-pap) +POLICY_PAP_PORT=30442 export SIM_IP @@ -47,7 +50,7 @@ echo MARIADB IP IS "${MARIADB_IP}" echo SIM_IP IS "${SIM_IP}" # wait for the app to start up -"${SCRIPTS}"/wait_for_port.sh "${POLICY_PDPX_IP}" 6969 +"${SCRIPTS}"/wait_for_rest.sh localhost "${POLICY_PDPX_PORT}" DATA2=${WORKSPACE}/models/models-examples/src/main/resources/policies @@ -55,5 +58,8 @@ ROBOT_VARIABLES="" ROBOT_VARIABLES="${ROBOT_VARIABLES} -v SCR_DMAAP:${SCRIPTS}" ROBOT_VARIABLES="${ROBOT_VARIABLES} -v DATA2:${DATA2}" ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PDPX_IP:${POLICY_PDPX_IP}" +ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PDPX_PORT:${POLICY_PDPX_PORT}" ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_IP:${POLICY_API_IP}" +ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_API_PORT:${POLICY_API_PORT}" ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PAP_IP:${POLICY_PAP_IP}" +ROBOT_VARIABLES="${ROBOT_VARIABLES} -v POLICY_PAP_PORT:${POLICY_PAP_PORT}" diff --git a/csit/xacml-pdp/tests/xacml-pdp-test.robot b/csit/xacml-pdp/tests/xacml-pdp-test.robot index 9b3df140..e29200ac 100644 --- a/csit/xacml-pdp/tests/xacml-pdp-test.robot +++ b/csit/xacml-pdp/tests/xacml-pdp-test.robot @@ -64,7 +64,7 @@ DeployPolicies [Documentation] Runs Policy PAP to deploy a policy ${postjson}= Get file ${CURDIR}/data/vCPE.policy.input.tosca.deploy.json ${policyadmin}= PolicyAdminAuth - PerformPostRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/policies 202 ${postjson} null ${policyadmin} + PerformPostRequest ${POLICY_PAP_PORT} /policy/pap/v1/pdps/policies 202 ${postjson} null ${policyadmin} ${result}= Run Process ${SCR_DMAAP}/wait_topic.sh POLICY-PDP-PAP ... responseTo xacml ACTIVE onap.restart.tca Should Be Equal As Integers ${result.rc} 0 @@ -129,7 +129,7 @@ GetStatisticsAfterDecision UndeployMonitorPolicy [Documentation] Runs Policy PAP to undeploy a policy ${policyadmin}= PolicyAdminAuth - PerformDeleteRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/policies/onap.restart.tca 202 ${policyadmin} + PerformDeleteRequest ${POLICY_PAP_PORT} /policy/pap/v1/pdps/policies/onap.restart.tca 202 ${policyadmin} GetStatisticsAfterUndeploy [Documentation] Runs Policy Xacml PDP Statistics after policy is undeployed @@ -140,11 +140,11 @@ GetStatisticsAfterUndeploy PdpxGetReq [Arguments] ${url} ${hcauth}= HealthCheckAuth - ${resp}= PerformGetRequest ${POLICY_PDPX_IP} ${url} 200 null ${hcauth} + ${resp}= PerformGetRequest ${POLICY_PDPX_PORT} ${url} 200 null ${hcauth} [return] ${resp} DecisionPostReq [Arguments] ${postjson} ${abbr} ${hcauth}= HealthCheckAuth - ${resp}= PerformPostRequest ${POLICY_PDPX_IP} /policy/pdpx/v1/decision 200 ${postjson} ${abbr} ${hcauth} + ${resp}= PerformPostRequest ${POLICY_PDPX_PORT} /policy/pdpx/v1/decision 200 ${postjson} ${abbr} ${hcauth} [return] ${resp} |