diff options
author | adheli.tavares <adheli.tavares@est.tech> | 2022-11-16 14:12:22 +0000 |
---|---|---|
committer | Adheli Tavares <adheli.tavares@est.tech> | 2022-11-17 13:01:39 +0000 |
commit | ce1e7de6148c00b00a2a48b0c2504fc8918db9dc (patch) | |
tree | f015efeb1c184c63a15bc795090fa921a830bee5 /main/src/test/java/org/onap/policy/pap/main/rest/e2e/PolicyStatusTest.java | |
parent | 6aa64b948942b402b496b84b89186bcd276ce04c (diff) |
Topic names in PAP should be configurable from application.yaml
- for using Kafka instead of dmaap, topics names need to be lowercase
- fix for unit/integration tests using default names and changed names
for topics and group
- fix for sonar lints found along the way
Issue-ID: POLICY-4455
Change-Id: I89e9e6f7dbb07462f1ae497755965cb5a3f223a3
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'main/src/test/java/org/onap/policy/pap/main/rest/e2e/PolicyStatusTest.java')
-rw-r--r-- | main/src/test/java/org/onap/policy/pap/main/rest/e2e/PolicyStatusTest.java | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/e2e/PolicyStatusTest.java b/main/src/test/java/org/onap/policy/pap/main/rest/e2e/PolicyStatusTest.java index 121318f5..09c8a2ac 100644 --- a/main/src/test/java/org/onap/policy/pap/main/rest/e2e/PolicyStatusTest.java +++ b/main/src/test/java/org/onap/policy/pap/main/rest/e2e/PolicyStatusTest.java @@ -4,6 +4,7 @@ * ================================================================================ * Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved. * Modifications Copyright (C) 2021-2022 Bell Canada. All rights reserved. + * Modifications Copyright (C) 2022 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,13 +51,11 @@ public class PolicyStatusTest extends End2EndBase { @Test public void testQueryAllDeployedPolicies() throws Exception { - String uri = POLICY_STATUS_ENDPOINT; - - Invocation.Builder invocationBuilder = sendRequest(uri); + Invocation.Builder invocationBuilder = sendRequest(POLICY_STATUS_ENDPOINT); Response rawresp = invocationBuilder.get(); assertEquals(Response.Status.OK.getStatusCode(), rawresp.getStatus()); - List<PolicyStatus> resp = rawresp.readEntity(new GenericType<List<PolicyStatus>>() {}); + List<PolicyStatus> resp = rawresp.readEntity(new GenericType<>() {}); assertEquals(1, resp.size()); checkAssertions(resp.get(0)); } @@ -69,7 +68,7 @@ public class PolicyStatusTest extends End2EndBase { Response rawresp = invocationBuilder.get(); assertEquals(Response.Status.OK.getStatusCode(), rawresp.getStatus()); - List<PolicyStatus> resp = rawresp.readEntity(new GenericType<List<PolicyStatus>>() {}); + List<PolicyStatus> resp = rawresp.readEntity(new GenericType<>() {}); assertEquals(1, resp.size()); checkAssertions(resp.get(0)); } @@ -88,13 +87,11 @@ public class PolicyStatusTest extends End2EndBase { @Test public void testGetStatusOfAllDeployedPolicies() throws Exception { - String uri = POLICY_DEPLOYMENT_STATUS_ENDPOINT; - - Invocation.Builder invocationBuilder = sendRequest(uri); + Invocation.Builder invocationBuilder = sendRequest(POLICY_DEPLOYMENT_STATUS_ENDPOINT); Response rawresp = invocationBuilder.get(); assertEquals(Response.Status.OK.getStatusCode(), rawresp.getStatus()); - List<PdpPolicyStatus> resp = rawresp.readEntity(new GenericType<List<PdpPolicyStatus>>() {}); + List<PdpPolicyStatus> resp = rawresp.readEntity(new GenericType<>() {}); assertEquals(1, resp.size()); checkAssertionsForDeploymentStatus(resp.get(0)); } @@ -107,7 +104,7 @@ public class PolicyStatusTest extends End2EndBase { Response rawresp = invocationBuilder.get(); assertEquals(Response.Status.OK.getStatusCode(), rawresp.getStatus()); - List<PdpPolicyStatus> resp = rawresp.readEntity(new GenericType<List<PdpPolicyStatus>>() {}); + List<PdpPolicyStatus> resp = rawresp.readEntity(new GenericType<>() {}); assertEquals(1, resp.size()); checkAssertionsForDeploymentStatus(resp.get(0)); } |