diff options
author | adheli.tavares <adheli.tavares@est.tech> | 2023-02-28 12:59:37 +0000 |
---|---|---|
committer | adheli.tavares <adheli.tavares@est.tech> | 2023-03-01 10:56:01 +0000 |
commit | 1153b6d0153344d4d92518d2ca73ecfe71dfa9d9 (patch) | |
tree | 019fcc478bc3cda85d28ed960926a4729d0ff782 /csit/resources/tests/apex-pdp-test.robot | |
parent | fde3ffa6e508ae30945c8f2fefbf941bf6d42074 (diff) |
New Test Development
- api, pap (except consolidated HC), apex and acm runtime passing
on both docker and helm environment
- other simulators exposed on simulator service
- topics are checked on test with robot http support
- apex temp engine port exposed
- xacml readiness added
Issue-ID: POLICY-4125
Change-Id: I39ee8c38e70dd3a4ad26ba69d7c62e61a211469e
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'csit/resources/tests/apex-pdp-test.robot')
-rw-r--r-- | csit/resources/tests/apex-pdp-test.robot | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/csit/resources/tests/apex-pdp-test.robot b/csit/resources/tests/apex-pdp-test.robot index 28a57065..57fc93b3 100644 --- a/csit/resources/tests/apex-pdp-test.robot +++ b/csit/resources/tests/apex-pdp-test.robot @@ -11,14 +11,14 @@ Resource ${CURDIR}/common-library.robot Healthcheck [Documentation] Runs Apex PDP Health check - ${hcauth}= HealthCheckAuth + ${hcauth}= PolicyAdminAuth ${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']} ExecuteApexSampleDomainPolicy + # [Tags] docker Set Test Variable ${policyName} onap.policies.native.apex.Sampledomain - Log ${policyName} ${postjson}= Get File ${CURDIR}/data/${policyName}.json CreatePolicy /policy/api/v1/policytypes/onap.policies.native.Apex/versions/1.0.0/policies 200 ${postjson} ${policyName} 1.0.0 Wait Until Keyword Succeeds 3 min 5 sec VerifyPdpStatistics 0 0 0 0 @@ -34,8 +34,7 @@ ExecuteApexTestPnfPolicy CreatePolicy /policy/api/v1/policytypes/onap.policies.native.Apex/versions/1.0.0/policies 200 ${postjson} ${policyName} 1.0.0 DeployPolicy Wait Until Keyword Succeeds 2 min 5 sec QueryPolicyStatus ${policyName} defaultGroup apex ${pdpName} onap.policies.native.Apex - ${result}= Run Process ${CURDIR}/data/make_topic.sh APEX-CL-MGT - Should Be Equal As Integers ${result.rc} 0 + GetTopic APEX-CL-MGT Wait Until Keyword Succeeds 2 min 5 sec TriggerAndVerifyTestPnfPolicy ExecuteApexTestVnfPolicy @@ -44,8 +43,7 @@ ExecuteApexTestVnfPolicy CreatePolicy /policy/api/v1/policytypes/onap.policies.native.Apex/versions/1.0.0/policies 200 ${postjson} ${policyName} 1.0.0 DeployPolicy Wait Until Keyword Succeeds 2 min 5 sec QueryPolicyStatus ${policyName} defaultGroup apex ${pdpName} onap.policies.native.Apex - ${result}= Run Process ${CURDIR}/data/make_topic.sh APEX-CL-MGT - Should Be Equal As Integers ${result.rc} 0 + GetTopic APEX-CL-MGT Wait Until Keyword Succeeds 2 min 5 sec TriggerAndVerifyTestVnfPolicy ExecuteApexTestPnfPolicyWithMetadataSet @@ -56,13 +54,12 @@ ExecuteApexTestPnfPolicyWithMetadataSet CreateNodeTemplate /policy/api/v1/nodetemplates 200 ${postjson} 1 DeployPolicy Wait Until Keyword Succeeds 2 min 5 sec QueryPolicyStatus ${policyName} defaultGroup apex ${pdpName} onap.policies.native.Apex - ${result}= Run Process ${CURDIR}/data/make_topic.sh APEX-CL-MGT2 - Should Be Equal As Integers ${result.rc} 0 + GetTopic APEX-CL-MGT2 Wait Until Keyword Succeeds 2 min 5 sec TriggerAndVerifyTestPnfPolicy Metrics [Documentation] Verify policy-apex-pdp is exporting prometheus metrics - ${auth}= HealthCheckAuth + ${auth}= PolicyAdminAuth ${resp}= PerformGetRequest ${APEX_IP} /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 @@ -125,10 +122,8 @@ TriggerAndVerifyTestVnfPolicy CheckLogMessage [Documentation] Read log messages received and check for expected content. [Arguments] ${status} ${expectedMsg} - ${result}= Run Process ${CURDIR}/data/wait_topic.sh APEX-CL-MGT ${status} - Log Received log event on APEX-CL-MGT topic ${result.stdout} - Should Be Equal As Integers ${result.rc} 0 - Should Contain ${result.stdout} ${expectedMsg} + ${result}= CheckTopic APEX-CL-MGT ${status} + Should Contain ${result} ${expectedMsg} VerifyPdpStatistics [Documentation] Verify pdp statistics after policy execution |