diff options
author | Ram Krishna Verma <ram_krishna.verma@bell.ca> | 2021-08-30 17:28:37 -0400 |
---|---|---|
committer | Ram Krishna Verma <ram_krishna.verma@bell.ca> | 2021-08-31 09:06:27 -0400 |
commit | 263f2bd07273cef4bc103f5198fa36e1e04297e5 (patch) | |
tree | 5c3126f5f1999bce698fc431cc73f0c277eaaac3 /models-sim/models-sim-dmaap/src/test | |
parent | 62c469dc0045e81979ac14aecb105f2150592c3a (diff) |
Add topics end point to dmaap sim
Add "/topics" end point to dmaap simulator.
It will be used in CSIT tests to verify consolidated health check.
Issue-ID: POLICY-3605
Change-Id: I6814d6dd021e0d98bd99754d4e68f789ef405353
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Diffstat (limited to 'models-sim/models-sim-dmaap/src/test')
-rw-r--r-- | models-sim/models-sim-dmaap/src/test/java/org/onap/policy/models/sim/dmaap/rest/DmaapSimRestControllerV1Test.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/models-sim/models-sim-dmaap/src/test/java/org/onap/policy/models/sim/dmaap/rest/DmaapSimRestControllerV1Test.java b/models-sim/models-sim-dmaap/src/test/java/org/onap/policy/models/sim/dmaap/rest/DmaapSimRestControllerV1Test.java index 7b84d543d..dd938d310 100644 --- a/models-sim/models-sim-dmaap/src/test/java/org/onap/policy/models/sim/dmaap/rest/DmaapSimRestControllerV1Test.java +++ b/models-sim/models-sim-dmaap/src/test/java/org/onap/policy/models/sim/dmaap/rest/DmaapSimRestControllerV1Test.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2021 Bell Canada. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,6 +19,7 @@ package org.onap.policy.models.sim.dmaap.rest; +import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertEquals; import java.io.File; @@ -82,6 +84,11 @@ public class DmaapSimRestControllerV1Test { resp = rest.getDmaapMessage(TOPIC, CONSUMER, CONSUMER_ID, LIMIT, 0); assertEquals(Response.Status.OK.getStatusCode(), resp.getStatus()); assertEquals("[my-message, my-message-B]", resp.getEntity().toString()); + + // verify getDmaapTopics + resp = rest.getDmaapTopics(); + assertEquals(Response.Status.OK.getStatusCode(), resp.getStatus()); + assertThat(resp.getEntity().toString()).contains("POLICY-PDP-PAP"); } private int getCount(Response resp) { |