diff options
author | a.sreekumar <ajith.sreekumar@bell.ca> | 2022-02-21 13:13:20 +0000 |
---|---|---|
committer | a.sreekumar <ajith.sreekumar@bell.ca> | 2022-02-23 10:29:36 +0000 |
commit | f0262c356f164c9a84bd3199e5f32b16356726fa (patch) | |
tree | fedc98bd66f3ba3223e646f145206bf9c961bad5 /main/src/test/java/org/onap/policy/pap/main/rest/e2e/PdpGroupDeployTest.java | |
parent | beef773a297cbeb5c5abfb5e75e678e39d3d1523 (diff) |
Adding deployment metrics to PAP
Change-Id: I4b6a93045c1ddfd7fff037e7568b029e2e45b0b3
Issue-ID: POLICY-3757
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Diffstat (limited to 'main/src/test/java/org/onap/policy/pap/main/rest/e2e/PdpGroupDeployTest.java')
-rw-r--r-- | main/src/test/java/org/onap/policy/pap/main/rest/e2e/PdpGroupDeployTest.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/e2e/PdpGroupDeployTest.java b/main/src/test/java/org/onap/policy/pap/main/rest/e2e/PdpGroupDeployTest.java index cdb1fa9d..df749a88 100644 --- a/main/src/test/java/org/onap/policy/pap/main/rest/e2e/PdpGroupDeployTest.java +++ b/main/src/test/java/org/onap/policy/pap/main/rest/e2e/PdpGroupDeployTest.java @@ -22,6 +22,7 @@ package org.onap.policy.pap.main.rest.e2e; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; @@ -121,6 +122,8 @@ public class PdpGroupDeployTest extends End2EndBase { assertEquals(PdpGroupDeployControllerV1.POLICY_STATUS_URI, resp.getUri()); assertNull(resp.getErrorDetails()); + assertThat(meterRegistry.counter(deploymentsCounterName, deploymentSuccessTag).count()).isEqualTo(2); + // repeat with unknown group - should fail DeploymentGroup group = groups.getGroups().get(0); group.setName("unknown-group"); @@ -167,6 +170,8 @@ public class PdpGroupDeployTest extends End2EndBase { notifications.add(msg); }); + assertThat(meterRegistry.counter(deploymentsCounterName, deploymentSuccessTag).count()).isEqualTo(0); + Invocation.Builder invocationBuilder = sendRequest(DEPLOY_POLICIES_ENDPOINT); PdpDeployPolicies policies = loadJsonFile("deployPoliciesReq2.json", PdpDeployPolicies.class); @@ -202,5 +207,7 @@ public class PdpGroupDeployTest extends End2EndBase { resp = rawresp.readEntity(PdpGroupDeployResponse.class); assertEquals(Response.Status.ACCEPTED.getStatusCode(), rawresp.getStatus()); assertNull(resp.getErrorDetails()); + + assertThat(meterRegistry.counter(deploymentsCounterName, deploymentSuccessTag).count()).isEqualTo(2); } } |