From a45eb46d8e0cfc228e3d56523c101152821badce Mon Sep 17 00:00:00 2001 From: "Kotagiri, Ramprasad (rp5662)" Date: Mon, 31 Aug 2020 16:33:58 -0400 Subject: fix issue with deploying server TLS certificates Issue-ID: DCAEGEN2-2298 Change-Id: I45cb6684902f7eedfb84a390717bdfb3dd51f746 Signed-off-by: Kotagiri, Ramprasad (rp5662) --- ccsdk-app-common/.checkstyle | 16 ++++++++-------- ccsdk-app-common/pom.xml | 3 +++ .../ccsdk/dashboard/rest/CloudifyRestClientImpl.java | 3 ++- .../ccsdk/dashboard/rest/CloudifyRestClientImplTest.java | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) (limited to 'ccsdk-app-common') diff --git a/ccsdk-app-common/.checkstyle b/ccsdk-app-common/.checkstyle index 327b388..46eb53c 100644 --- a/ccsdk-app-common/.checkstyle +++ b/ccsdk-app-common/.checkstyle @@ -1,21 +1,21 @@ - + + - - + + - - - + + - - + + diff --git a/ccsdk-app-common/pom.xml b/ccsdk-app-common/pom.xml index e9595d3..3266c22 100644 --- a/ccsdk-app-common/pom.xml +++ b/ccsdk-app-common/pom.xml @@ -29,6 +29,9 @@ false 0.7.6.201602180812 2.9.8 + + ${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml + diff --git a/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/rest/CloudifyRestClientImpl.java b/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/rest/CloudifyRestClientImpl.java index ab9dd59..6b7af79 100644 --- a/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/rest/CloudifyRestClientImpl.java +++ b/ccsdk-app-common/src/main/java/org/onap/ccsdk/dashboard/rest/CloudifyRestClientImpl.java @@ -1103,8 +1103,9 @@ public class CloudifyRestClientImpl extends RestClientBase implements CloudifyCl public CloudifyPluginList getPlugins() throws Exception { String url = buildUrl(new String[] {baseUrl, PLUGINS}, null); logger.debug(EELFLoggerDelegate.debugLogger, "getPlugins: url {}", url); + HttpEntity entity = getTenantHeader("default_tenant"); ResponseEntity response = restTemplate.exchange(url, HttpMethod.GET, - null, new ParameterizedTypeReference() {}); + entity, new ParameterizedTypeReference() {}); CloudifyPluginList result = response.getBody(); return result; } diff --git a/ccsdk-app-common/src/test/java/org/onap/ccsdk/dashboard/rest/CloudifyRestClientImplTest.java b/ccsdk-app-common/src/test/java/org/onap/ccsdk/dashboard/rest/CloudifyRestClientImplTest.java index a6f5038..c117f23 100644 --- a/ccsdk-app-common/src/test/java/org/onap/ccsdk/dashboard/rest/CloudifyRestClientImplTest.java +++ b/ccsdk-app-common/src/test/java/org/onap/ccsdk/dashboard/rest/CloudifyRestClientImplTest.java @@ -772,7 +772,7 @@ public class CloudifyRestClientImplTest extends MockitoTestSuite { ResponseEntity response = new ResponseEntity(cfyPluginList, HttpStatus.OK); - when(mockRest.exchange(anyString(), eq(HttpMethod.GET), isNull(), + when(mockRest.exchange(anyString(), eq(HttpMethod.GET), any(HttpEntity.class), eq(new ParameterizedTypeReference() {}))).thenReturn(response); CloudifyPluginList actuals = subject.getPlugins(); -- cgit 1.2.3-korg