summaryrefslogtreecommitdiffstats
path: root/csit/apex-pdp/tests
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2021-11-01 10:40:32 +0000
committeradheli.tavares <adheli.tavares@est.tech>2021-11-05 19:18:24 +0000
commit496b301c101f2a21e8408048dc0fd57c59a12d92 (patch)
treecc4761ab8dbe6c29caefd08391a2e06341fe29dd /csit/apex-pdp/tests
parent6db3db236b6987af30a6fdb12ae6f9ea017c3856 (diff)
Rename username for API and PAP operations.
Use an account other than healthcheck in API and PAP for provisioning of policies. Issue-ID: POLICY-2744 Change-Id: Id2cbba8e5e5095996622572fbf42383bb854fb43 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'csit/apex-pdp/tests')
-rw-r--r--csit/apex-pdp/tests/apex-pdp-test.robot13
1 files changed, 8 insertions, 5 deletions
diff --git a/csit/apex-pdp/tests/apex-pdp-test.robot b/csit/apex-pdp/tests/apex-pdp-test.robot
index 380b3779..911a4371 100644
--- a/csit/apex-pdp/tests/apex-pdp-test.robot
+++ b/csit/apex-pdp/tests/apex-pdp-test.robot
@@ -11,13 +11,15 @@ Resource ${CURDIR}/../../common-library.robot
Healthcheck
[Documentation] Runs Apex PDP Health check
- ${resp}= PerformGetRequest ${APEX_IP} /policy/apex-pdp/v1/healthcheck 200 null
+ ${hcauth}= HealthCheckAuth
+ ${resp}= PerformGetRequest ${APEX_IP} /policy/apex-pdp/v1/healthcheck 200 null ${hcauth}
Should Be Equal As Strings ${resp.json()['code']} 200
Set Suite Variable ${pdpName} ${resp.json()['name']}
Metrics
[Documentation] Verify policy-apex-pdp is exporting prometheus metrics
- ${resp}= PerformGetRequest ${APEX_IP} /metrics 200 null
+ ${hcauth}= HealthCheckAuth
+ ${resp}= PerformGetRequest ${APEX_IP} /metrics 200 null ${hcauth}
Should Contain ${resp.text} jvm_threads_current
ExecuteApexSampleDomainPolicy
@@ -53,14 +55,14 @@ ExecuteApexTestVnfPolicy
*** Keywords ***
-
DeployPolicy
[Documentation] Deploy the policy in apex-pdp engine
${postjson}= Get file ${CURDIR}/data/policy_deploy.json
${postjson}= evaluate json.loads('''${postjson}''') json
set to dictionary ${postjson['groups'][0]['deploymentSubgroups'][0]['policies'][0]} name=${policyName}
${postjson}= evaluate json.dumps(${postjson}) json
- PerformPostRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/deployments/batch 202 ${postjson} null
+ ${policyadmin}= PolicyAdminAuth
+ PerformPostRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/deployments/batch 202 ${postjson} null ${policyadmin}
RunEventOnApexEngine
[Documentation] Send event to verify policy execution
@@ -104,7 +106,8 @@ CheckLogMessage
VerifyPdpStatistics
[Documentation] Verify pdp statistics after policy execution
[Arguments] ${deployCount} ${deploySuccessCount} ${executedCount} ${executedSuccessCount}
- ${resp}= PerformGetRequest ${POLICY_PAP_IP} /policy/pap/v1/pdps/statistics/defaultGroup/apex/${pdpName} 200 null
+ ${policyadmin}= PolicyAdminAuth
+ ${resp}= PerformGetRequest ${POLICY_PAP_IP} /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