From 263f2bd07273cef4bc103f5198fa36e1e04297e5 Mon Sep 17 00:00:00 2001 From: Ram Krishna Verma Date: Mon, 30 Aug 2021 17:28:37 -0400 Subject: 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 --- .../policy/models/sim/dmaap/rest/DmaapSimRestControllerV1Test.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'models-sim/models-sim-dmaap/src/test/java/org') 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) { -- cgit 1.2.3-korg