From 179237337ae53f0a2df5ba24e865a668340e0da0 Mon Sep 17 00:00:00 2001 From: Ram Krishna Verma Date: Mon, 24 Jan 2022 16:53:04 -0500 Subject: Add testcase for app metrics exposed by distribution Adding testcases to verify the application level metrics exposed by policy-distribution component. Issue-ID: POLICY-3759 Change-Id: I3cbc36011c358dc9f52aa01c663eb8ff02a6323a Signed-off-by: Ram Krishna Verma --- csit/distribution/tests/distribution-test.robot | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/csit/distribution/tests/distribution-test.robot b/csit/distribution/tests/distribution-test.robot index 8bf4b84d..c283f668 100644 --- a/csit/distribution/tests/distribution-test.robot +++ b/csit/distribution/tests/distribution-test.robot @@ -23,11 +23,27 @@ Metrics [Documentation] Verify policy-distribution is exporting prometheus metrics ${hcauth}= HealthCheckAuth ${resp}= PerformGetRequest ${POLICY_DISTRIBUTION_IP} /metrics 200 null ${hcauth} - Should Contain ${resp.text} jvm_threads_current + Should Contain ${resp.text} total_distribution_received_count_total 0.0 + Should Contain ${resp.text} distribution_success_count_total 0.0 + Should Contain ${resp.text} distribution_failure_count_total 0.0 + Should Contain ${resp.text} total_download_received_count_total 0.0 + Should Contain ${resp.text} download_success_count_total 0.0 + Should Contain ${resp.text} download_failure_count_total 0.0 InvokeDistributionAndRunEventOnEngine Wait Until Keyword Succeeds 5 min 30 sec InvokeDistributionUsingFile And RunEventOnApexEngine +MetricsAfterExecution + [Documentation] Verify policy-distribution is exporting prometheus metrics after execution + ${hcauth}= HealthCheckAuth + ${resp}= PerformGetRequest ${POLICY_DISTRIBUTION_IP} /metrics 200 null ${hcauth} + Should Contain ${resp.text} total_distribution_received_count_total 1.0 + Should Contain ${resp.text} distribution_success_count_total 1.0 + Should Contain ${resp.text} distribution_failure_count_total 0.0 + Should Contain ${resp.text} total_download_received_count_total 1.0 + Should Contain ${resp.text} download_success_count_total 1.0 + Should Contain ${resp.text} download_failure_count_total 0.0 + *** Keywords *** InvokeDistributionUsingFile And RunEventOnApexEngine -- cgit 1.2.3-korg