aboutsummaryrefslogtreecommitdiffstats
path: root/csit/apex-pdp/tests/apex-pdp-test.robot
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2023-02-10 22:01:43 +0000
committerliamfallon <liam.fallon@est.tech>2023-02-13 16:45:02 +0000
commitf5a11b0b346df610ffa8d9857956abf113ce6765 (patch)
treecb27bb6b9e29c2d23ac313d86b4bbdfe5883a855 /csit/apex-pdp/tests/apex-pdp-test.robot
parent600a3002192da1ba2174c63d248a46dc27414397 (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/apex-pdp/tests/apex-pdp-test.robot')
-rw-r--r--csit/apex-pdp/tests/apex-pdp-test.robot14
1 files changed, 7 insertions, 7 deletions
diff --git a/csit/apex-pdp/tests/apex-pdp-test.robot b/csit/apex-pdp/tests/apex-pdp-test.robot
index 77393270..3de53a96 100644
--- a/csit/apex-pdp/tests/apex-pdp-test.robot
+++ b/csit/apex-pdp/tests/apex-pdp-test.robot
@@ -12,7 +12,7 @@ Resource ${CURDIR}/../../common-library.robot
Healthcheck
[Documentation] Runs Apex PDP Health check
${hcauth}= HealthCheckAuth
- ${resp}= PerformGetRequest ${APEX_IP} /policy/apex-pdp/v1/healthcheck 200 null ${hcauth}
+ ${resp}= PerformGetRequest ${APEX_PORT} /policy/apex-pdp/v1/healthcheck 200 null ${hcauth}
Should Be Equal As Strings ${resp.json()['code']} 200
Set Suite Variable ${pdpName} ${resp.json()['name']}
@@ -62,7 +62,7 @@ ExecuteApexTestPnfPolicyWithMetadataSet
Metrics
[Documentation] Verify policy-apex-pdp is exporting prometheus metrics
${auth}= HealthCheckAuth
- ${resp}= PerformGetRequest ${APEX_IP} /metrics 200 null ${auth}
+ ${resp}= PerformGetRequest ${APEX_PORT} /metrics 200 null ${auth}
Should Contain ${resp.text} pdpa_policy_deployments_total{operation="deploy",status="TOTAL",} 4.0
Should Contain ${resp.text} pdpa_policy_deployments_total{operation="deploy",status="SUCCESS",} 4.0
Should Contain ${resp.text} pdpa_policy_executions_total{status="SUCCESS",} 3.0
@@ -88,11 +88,11 @@ DeployPolicy
set to dictionary ${postjson['groups'][0]['deploymentSubgroups'][0]['policies'][0]} name=${policyName}
${postjson}= evaluate json.dumps(${postjson}) json
${policyadmin}= PolicyAdminAuth
- PerformPostRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/deployments/batch 202 ${postjson} null ${policyadmin}
+ PerformPostRequest ${POLICY_PAP_PORT} /policy/pap/v1/pdps/deployments/batch 202 ${postjson} null ${policyadmin}
RunEventOnApexEngine
[Documentation] Send event to verify policy execution
- Create Session apexSession http://${APEX_IP}:23324 max_retries=1
+ Create Session apexSession http://localhost:23324 max_retries=1
${data}= Get Binary File ${CURDIR}${/}data${/}event.json
&{headers}= Create Dictionary Content-Type=application/json Accept=application/json
${resp}= PUT On Session apexSession /apex/FirstConsumer/EventIn data=${data} headers=${headers}
@@ -100,7 +100,7 @@ RunEventOnApexEngine
TriggerAndVerifyTestPnfPolicy
[Documentation] Send TestPnf policy trigger event to DMaaP and read notifications to verify policy execution
- Create Session apexSession http://${DMAAP_IP}:3904 max_retries=1
+ Create Session apexSession http://localhost:30227 max_retries=1
${data}= Get Binary File ${CURDIR}/data/VesEventForPnfPolicy.json
&{headers}= Create Dictionary Content-Type=application/json Accept=application/json
${resp}= POST On Session apexSession /events/unauthenticated.DCAE_CL_OUTPUT data=${data} headers=${headers}
@@ -111,7 +111,7 @@ TriggerAndVerifyTestPnfPolicy
TriggerAndVerifyTestVnfPolicy
[Documentation] Send TestVnf policy trigger event to DMaaP and read notifications to verify policy execution
- Create Session apexSession http://${DMAAP_IP}:3904 max_retries=1
+ Create Session apexSession http://localhost:30227 max_retries=1
${data}= Get Binary File ${CURDIR}/data/VesEventForVnfPolicy.json
&{headers}= Create Dictionary Content-Type=application/json Accept=application/json
${resp}= POST On Session apexSession /events/unauthenticated.DCAE_POLICY_EXAMPLE_OUTPUT data=${data} headers=${headers}
@@ -133,7 +133,7 @@ VerifyPdpStatistics
[Documentation] Verify pdp statistics after policy execution
[Arguments] ${deployCount} ${deploySuccessCount} ${executedCount} ${executedSuccessCount}
${policyadmin}= PolicyAdminAuth
- ${resp}= PerformGetRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/statistics/defaultGroup/apex/${pdpName} 200 null ${policyadmin}
+ ${resp}= PerformGetRequest ${POLICY_PAP_PORT} /policy/pap/v1/pdps/statistics/defaultGroup/apex/${pdpName} 200 null ${policyadmin}
Should Be Equal As Strings ${resp.status_code} 200
Should Be Equal As Strings ${resp.json()['defaultGroup']['apex'][0]['pdpInstanceId']} ${pdpName}
Should Be Equal As Strings ${resp.json()['defaultGroup']['apex'][0]['pdpGroupName']} defaultGroup