summaryrefslogtreecommitdiffstats
path: root/csit/distribution/tests/distribution-test.robot
diff options
context:
space:
mode:
authora.sreekumar <ajith.sreekumar@bell.ca>2021-08-20 17:39:53 +0100
committera.sreekumar <ajith.sreekumar@bell.ca>2021-08-25 10:37:51 +0100
commit60d6a08c8376f66d4cd655de48949d50e8ec1d7a (patch)
tree251704ccdf9417906d1568d4f5c7d4103fbca7bf /csit/distribution/tests/distribution-test.robot
parente43792b9a7c27a5157fe70179b79db09e3d94098 (diff)
Update CSITs for metrics + refactoring
Change-Id: I5d090765ff29143f689c6754a7a1ad55dae1c1b4 Issue-ID: POLICY-3524 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Diffstat (limited to 'csit/distribution/tests/distribution-test.robot')
-rw-r--r--csit/distribution/tests/distribution-test.robot20
1 files changed, 8 insertions, 12 deletions
diff --git a/csit/distribution/tests/distribution-test.robot b/csit/distribution/tests/distribution-test.robot
index 64a77e06..2513a6ca 100644
--- a/csit/distribution/tests/distribution-test.robot
+++ b/csit/distribution/tests/distribution-test.robot
@@ -3,19 +3,25 @@ Library Collections
Library RequestsLibrary
Library OperatingSystem
Library json
+Resource ${CURDIR}/../../common-library.robot
*** Test Cases ***
Healthcheck
[Documentation] Verify policy distribution health check
- ${resp}= PeformGetRequest /healthcheck 200
+ ${resp}= PerformGetRequest ${POLICY_DISTRIBUTION_IP} /healthcheck 200 null
Should Be Equal As Strings ${resp.json()['code']} 200
Statistics
[Documentation] Verify policy distribution statistics
- ${resp}= PeformGetRequest /statistics 200
+ ${resp}= PerformGetRequest ${POLICY_DISTRIBUTION_IP} /statistics 200 null
Should Be Equal As Strings ${resp.json()['code']} 200
+Metrics
+ [Documentation] Verify policy-distribution is exporting prometheus metrics
+ ${resp}= PerformGetRequest ${POLICY_DISTRIBUTION_IP} /metrics 200 null
+ Should Contain ${resp.text} jvm_threads_current
+
InvokeDistributionAndRunEventOnEngine
Wait Until Keyword Succeeds 5 min 30 sec InvokeDistributionUsingFile And RunEventOnApexEngine
@@ -30,13 +36,3 @@ InvokeDistributionUsingFile And RunEventOnApexEngine
&{headers}= Create Dictionary Content-Type=application/json Accept=application/json
${resp}= PUT On Session apexSession /apex/FirstConsumer/EventIn data=${data} headers=${headers} expected_status=200
Remove Files ${SCRIPT_DIR}/temp/sample_csar_with_apex_policy.csar
-
-PeformGetRequest
- [Arguments] ${url} ${expectedstatus}
- ${auth}= Create List healthcheck zb!XztG34
- Log Creating session https://${POLICY_DISTRIBUTION_IP}:6969
- ${session}= Create Session policy https://${POLICY_DISTRIBUTION_IP}:6969 auth=${auth}
- ${headers}= Create Dictionary Accept=application/json Content-Type=application/json
- ${resp}= GET On Session policy ${url} headers=${headers} expected_status=${expectedstatus}
- Log Received response from policy ${resp.text}
- [return] ${resp}