diff options
author | Ajith Sreekumar <ajith.sreekumar@bell.ca> | 2022-03-28 09:12:20 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2022-03-28 09:12:20 +0000 |
commit | 6d3f79492ea9ad35347606c2c4748b50133a5ba8 (patch) | |
tree | a0062d6203eecc8f098425ceda5913fe8eb2a222 /csit/api/tests | |
parent | cff282c3cbcaa3299569a604c19c6967164d9c21 (diff) | |
parent | 3a34857fa082055ba25659f4d1e53d61472f860c (diff) |
Merge "Add CSIT Test cases for api metrics"
Diffstat (limited to 'csit/api/tests')
-rw-r--r-- | csit/api/tests/api-test.robot | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/csit/api/tests/api-test.robot b/csit/api/tests/api-test.robot index c5c7e860..4eb48888 100644 --- a/csit/api/tests/api-test.robot +++ b/csit/api/tests/api-test.robot @@ -11,12 +11,8 @@ Healthcheck [Documentation] Verify policy api health check ${resp}= GetReq /policy/api/v1/healthcheck Should Be Equal As Strings ${resp.json()['code']} 200 - -Metrics - [Documentation] Verify policy-api is exporting prometheus metrics - ${auth}= PolicyAdminAuth - ${resp}= GetMetrics ${POLICY_API_IP} ${auth} - Should Contain ${resp.text} jvm_threads_live_threads + Should Be Equal As Strings ${resp.json()['healthy']} True + Should Be Equal As Strings ${resp.json()['message']} alive Statistics [Documentation] Verify policy api statistics @@ -106,6 +102,28 @@ DeleteSpecificPolicyTypeV2 DeleteReq /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/2.0.0 200 DeleteReq /policy/api/v1/policytypes/onap.policies.monitoring.tcagen2/versions/2.0.0 404 +Metrics + [Documentation] Verify policy-api is exporting prometheus metrics + ${auth}= PolicyAdminAuth + ${resp}= GetMetrics ${POLICY_API_IP} ${auth} + Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/api/v1/healthcheck",} 1.0 + Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/api/v1/statistics",} 1.0 + Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/api/v1/policytypes",} 1.0 + Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/api/v1/policies",} 1.0 + Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/api/v1/policies/{policyId}/versions/{policyVersion}",} 1.0 + Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="GET",outcome="SUCCESS",status="200",uri="/policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies",} 1.0 + Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="POST",outcome="SUCCESS",status="200",uri="/policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies",} 1.0 + Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="POST",outcome="SUCCESS",status="200",uri="/policy/api/v1/policytypes",} 1.0 + Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="DELETE",outcome="SUCCESS",status="200",uri="/policy/api/v1/policies/{policyId}/versions/{policyVersion}",} 1.0 + Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="DELETE",outcome="SUCCESS",status="200",uri="/policy/api/v1/policytypes/{policyTypeId}/versions/{versionId}",} 2.0 + Should Contain ${resp.text} http_server_requests_seconds_count{exception="None",method="DELETE",outcome="SUCCESS",status="200",uri="/policy/api/v1/policytypes/{policyTypeId}/versions/{policyTypeVersion}/policies/{policyId}/versions/{policyVersion}",} 1.0 + Should Contain ${resp.text} http_server_requests_seconds_sum + Should Contain ${resp.text} http_server_requests_seconds_max + Should Contain ${resp.text} spring_data_repository_invocations_seconds_count + Should Contain ${resp.text} spring_data_repository_invocations_seconds_sum + Should Contain ${resp.text} spring_data_repository_invocations_seconds_max + Should Contain ${resp.text} jvm_threads_live_threads + *** Keywords *** GetReq |