summaryrefslogtreecommitdiffstats
path: root/main/src/test
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2022-12-08 18:44:09 +0000
committerliamfallon <liam.fallon@est.tech>2022-12-08 18:44:13 +0000
commit5ac400df6381d2f275e0359cb06c7904eddf1faf (patch)
tree2a3ac7b8d6382d6d572f6034e46e57f699a6143c /main/src/test
parent64e5fee5475ff3172caa98b00d719ce5f1308b5d (diff)
Replace SpringFox with SpringDoc in policy-pap
This commit: - Remove SpringFox - Adds SpringDoc - Enables the .../v3/api-docs endpoint Note that the Swagger annotations from the OpenAPI specification generated code need to be enabled so that the API specification is available over the ..../v3/api-docs endpoint. THis will be done in subsequent commits. Issue-ID: POLICY-4404 Change-Id: I42c1575a3ce76d9b3e753ad51f85df027d12b980 Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'main/src/test')
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java2
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/rest/PapRestControllerV1Test.java1
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupStateChangeControllerV1.java1
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/rest/TestPolicyAuditControllerV1.java1
-rw-r--r--main/src/test/java/org/onap/policy/pap/main/rest/TestStatisticsRestControllerV1.java1
5 files changed, 1 insertions, 5 deletions
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java b/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java
index fd4bb742..04971cce 100644
--- a/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java
+++ b/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java
@@ -145,7 +145,7 @@ public abstract class CommonPapRestServer {
*/
protected void testSwagger(final String endpoint) throws Exception {
final Invocation.Builder invocationBuilder =
- sendFqeRequest(httpsPrefix + "v2/api-docs", true, MediaType.APPLICATION_JSON);
+ sendFqeRequest(httpsPrefix + "v3/api-docs", true, MediaType.APPLICATION_JSON);
final String resp = invocationBuilder.get(String.class);
assertTrue(resp.contains(ENDPOINT_PREFIX + endpoint));
}
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/PapRestControllerV1Test.java b/main/src/test/java/org/onap/policy/pap/main/rest/PapRestControllerV1Test.java
index 1af9ff55..d1d29f0c 100644
--- a/main/src/test/java/org/onap/policy/pap/main/rest/PapRestControllerV1Test.java
+++ b/main/src/test/java/org/onap/policy/pap/main/rest/PapRestControllerV1Test.java
@@ -31,7 +31,6 @@ import javax.ws.rs.core.SecurityContext;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.springframework.http.ResponseEntity;
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupStateChangeControllerV1.java b/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupStateChangeControllerV1.java
index 48009117..6762c49c 100644
--- a/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupStateChangeControllerV1.java
+++ b/main/src/test/java/org/onap/policy/pap/main/rest/TestPdpGroupStateChangeControllerV1.java
@@ -28,7 +28,6 @@ import javax.ws.rs.client.Invocation;
import javax.ws.rs.core.Response;
import org.junit.Test;
import org.onap.policy.models.pap.concepts.PdpGroupStateChangeResponse;
-import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ActiveProfiles;
/**
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/TestPolicyAuditControllerV1.java b/main/src/test/java/org/onap/policy/pap/main/rest/TestPolicyAuditControllerV1.java
index 8658b7d2..23fa803a 100644
--- a/main/src/test/java/org/onap/policy/pap/main/rest/TestPolicyAuditControllerV1.java
+++ b/main/src/test/java/org/onap/policy/pap/main/rest/TestPolicyAuditControllerV1.java
@@ -24,7 +24,6 @@ import static org.junit.Assert.assertEquals;
import javax.ws.rs.client.Invocation;
import javax.ws.rs.core.Response;
import org.junit.Test;
-import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ActiveProfiles;
/**
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/TestStatisticsRestControllerV1.java b/main/src/test/java/org/onap/policy/pap/main/rest/TestStatisticsRestControllerV1.java
index 0ed36d58..e19bdb85 100644
--- a/main/src/test/java/org/onap/policy/pap/main/rest/TestStatisticsRestControllerV1.java
+++ b/main/src/test/java/org/onap/policy/pap/main/rest/TestStatisticsRestControllerV1.java
@@ -27,7 +27,6 @@ import javax.ws.rs.client.Invocation;
import org.junit.Test;
import org.onap.policy.common.utils.services.Registry;
import org.onap.policy.pap.main.PapConstants;
-import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ActiveProfiles;
/**