From 2bc8d6b5da92f02384485c81cd01d5715285f68f Mon Sep 17 00:00:00 2001 From: "a.sreekumar" Date: Mon, 18 Oct 2021 10:08:03 +0100 Subject: Policy-API S3P jmx changes for Istanbul Pushing this review on behalf of prakhar.pandey@bell.ca Change-Id: Iede1ecbbcec4d0d16636d69e770fed094257315a Issue-ID: POLICY-3652 Signed-off-by: a.sreekumar --- .../resources/testplans/policy_api_stability.jmx | 109 ++++++++++++++++++++- 1 file changed, 105 insertions(+), 4 deletions(-) (limited to 'testsuites/stability/src/main/resources') diff --git a/testsuites/stability/src/main/resources/testplans/policy_api_stability.jmx b/testsuites/stability/src/main/resources/testplans/policy_api_stability.jmx index cf2d4727..58692b72 100644 --- a/testsuites/stability/src/main/resources/testplans/policy_api_stability.jmx +++ b/testsuites/stability/src/main/resources/testplans/policy_api_stability.jmx @@ -1,5 +1,5 @@ - + @@ -10,12 +10,12 @@ API_HOST - 10.2.0.48 + 10.12.6.14 = API_PORT - 30785 + 32191 = @@ -26,7 +26,7 @@ - https://${API_HOST}:${API_PORT}/policy/api/v1 + https://${API_HOST}:${API_PORT}/ healthcheck zb!XztG34 @@ -64,6 +64,56 @@ true + + + + + ${API_HOST} + ${API_PORT} + https + + /policy/api/v1/healthcheck + GET + true + false + true + false + + + + + + + + 200 + + + Assertion.response_code + false + 1 + + + + true + + + import groovy.json.JsonSlurper; + +def res = []; +if (prev.getResponseCode() == '200') { + def jsonSlurper = new JsonSlurper(); + res = jsonSlurper.parseText(prev.getResponseDataAsString()); + + assert res instanceof Map; + assert res.code == 200; + assert res.name == "Policy API"; + assert res.healthy==true; + assert res.message=="alive"; +} + groovy + + + @@ -174,6 +224,57 @@ if (prev.getResponseCode() == '200') { true + + + + + ${API_HOST} + ${API_PORT} + https + + /metrics + GET + true + false + true + false + + + + + + + + 200 + + + Assertion.response_code + false + 1 + + + + groovy + + + true + def res = []; +if (prev.getResponseCode() == '200') { + res = prev.getResponseDataAsString(); + + assert res.contains("jvm_buffer_pool_used_bytes") + assert res.contains("jvm_buffer_pool_capacity_bytes") + assert res.contains("jvm_buffer_pool_used_buffers") + assert res.contains("jvm_memory_bytes_used") + assert res.contains("jvm_memory_bytes_committed") + assert res.contains("jvm_memory_pool_bytes_used") + assert res.contains("jvm_memory_pool_bytes_committed") + assert res.contains("jvm_memory_pool_allocated_bytes_created") + assert res.contains("jvm_memory_pool_allocated_bytes_total") +} + + + true -- cgit 1.2.3-korg