aboutsummaryrefslogtreecommitdiffstats
path: root/csit/resources/tests/apex-slas.robot
diff options
context:
space:
mode:
authorrameshiyer27 <ramesh.murugan.iyer@est.tech>2024-01-13 21:26:09 +0000
committerrameshiyer27 <ramesh.murugan.iyer@est.tech>2024-01-14 18:44:47 +0000
commitf2e4da7e296548fb3980fd212e3a67dc83254e1d (patch)
tree6c86423e586a94509889ce34fa08560d277752c4 /csit/resources/tests/apex-slas.robot
parentb9d434aeef048c4ea2cf9bd8a27681d375ec5b85 (diff)
Add kafka support in Policy CSIT
Issue-ID: POLICY-4402 Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech> Change-Id: I802c19a3c9817d304164eba634adb8c119aa4ced
Diffstat (limited to 'csit/resources/tests/apex-slas.robot')
-rw-r--r--csit/resources/tests/apex-slas.robot14
1 files changed, 4 insertions, 10 deletions
diff --git a/csit/resources/tests/apex-slas.robot b/csit/resources/tests/apex-slas.robot
index 408b0add..4191bb2a 100644
--- a/csit/resources/tests/apex-slas.robot
+++ b/csit/resources/tests/apex-slas.robot
@@ -23,13 +23,10 @@ ValidatePolicyExecutionAndEventRateLowComplexity
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
- GetTopic APEX-CL-MGT
- Create Session apexSession http://${DMAAP_IP} max_retries=1
+ GetKafkaTopic apex-cl-mgt
${data}= Get Binary File ${CURDIR}/data/VesEventForPnfPolicy.json
- &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
${eventStartTime}= Get Current Date
- ${resp}= POST On Session apexSession /events/unauthenticated.DCAE_CL_OUTPUT data=${data} headers=${headers}
- Should Be Equal As Strings ${resp.status_code} 200
+ ${resp}= Run Process ${CURDIR}/kafka_producer.py unauthenticated.dcae_cl_output ${data}
${eventEndTime}= Get Current Date
ValidateEventExecution ${eventStartTime} ${eventEndTime} 10
@@ -53,13 +50,10 @@ ValidatePolicyExecutionAndEventRateHighComplexity
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
- GetTopic APEX-CL-MGT2
- Create Session apexSession http://${DMAAP_IP} max_retries=1
+ GetKafkaTopic apex-cl-mgt2
${data}= Get Binary File ${CURDIR}/data/VesEventForVnfPolicy.json
- &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
${eventStartTime}= Get Current Date
- ${resp}= POST On Session apexSession /events/unauthenticated.DCAE_POLICY_EXAMPLE_OUTPUT data=${data} headers=${headers}
- Should Be Equal As Strings ${resp.status_code} 200
+ ${resp}= Run Process ${CURDIR}/kafka_producer.py unauthenticated.dcae_policy_example_output ${data}
${eventEndTime}= Get Current Date
ValidateEventExecution ${eventStartTime} ${eventEndTime} 0.2