aboutsummaryrefslogtreecommitdiffstats
path: root/rest-services
diff options
context:
space:
mode:
authorPiotr Jaszczyk <piotr.jaszczyk@nokia.com>2019-01-09 15:08:46 +0100
committerPiotr Jaszczyk <piotr.jaszczyk@nokia.com>2019-01-10 12:47:01 +0100
commit41fddf53b41e2870a94fa54454bd60665cc203c1 (patch)
tree4b23fe1bb533232296ec5d91603401ae095500dd /rest-services
parentcfde3ca7bb7122b1fddfca892276b011c12dfd05 (diff)
High Volume VES Collector Client - stub
Other minor changes: * Set dependencies to compatible versions (spring, spring-boot and reactor + reactor-netty) * Fix compilation errors on Java 11 Change-Id: If482c0dffd7162315df6d7b7fdedf554ef7c5d9d Issue-ID: DCAEGEN2-1070 Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
Diffstat (limited to 'rest-services')
-rw-r--r--rest-services/aai-client/pom.xml6
-rw-r--r--rest-services/aai-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/AaiReactiveWebClientFactoryTest.java7
-rw-r--r--rest-services/cbs-client/pom.xml4
-rw-r--r--rest-services/common-dependency/pom.xml4
-rw-r--r--rest-services/dmaap-client/pom.xml8
-rw-r--r--rest-services/dmaap-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPReactiveWebClientFactoryTest.java10
-rw-r--r--rest-services/pom.xml4
7 files changed, 27 insertions, 16 deletions
diff --git a/rest-services/aai-client/pom.xml b/rest-services/aai-client/pom.xml
index 5492e0a3..c799fc92 100644
--- a/rest-services/aai-client/pom.xml
+++ b/rest-services/aai-client/pom.xml
@@ -7,13 +7,13 @@
<parent>
<groupId>org.onap.dcaegen2.services.sdk</groupId>
<artifactId>dcaegen2-services-sdk-rest-services</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.1.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
<artifactId>aai-client</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.1.1-SNAPSHOT</version>
<name>dcaegen2-services-sdk-rest-services-aai-client</name>
<description>Active and Available Inventory Rest Services Module</description>
@@ -23,7 +23,7 @@
<dependency>
<groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
<artifactId>common-dependency</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
diff --git a/rest-services/aai-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/AaiReactiveWebClientFactoryTest.java b/rest-services/aai-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/AaiReactiveWebClientFactoryTest.java
index 153189fd..46a57b69 100644
--- a/rest-services/aai-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/AaiReactiveWebClientFactoryTest.java
+++ b/rest-services/aai-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/aai/client/service/AaiReactiveWebClientFactoryTest.java
@@ -25,6 +25,7 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import io.netty.handler.ssl.SslContext;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.onap.dcaegen2.services.sdk.rest.services.aai.client.config.AaiClientConfiguration;
@@ -42,6 +43,7 @@ class AaiReactiveWebClientFactoryTest {
private SslFactory sslFactory = mock(SslFactory.class);
private AaiClientConfiguration aaiClientConfiguration = mock(AaiClientConfiguration.class);
private AaiReactiveWebClientFactory aaiReactiveWebClientFactory;
+ private SslContext dummySslContext = mock(SslContext.class);
@Test
void shouldCreateWebClientWithSecureSslContext() throws SSLException {
@@ -56,17 +58,20 @@ class AaiReactiveWebClientFactoryTest {
@Test
void shouldCreateWebClientWithInsecureSslContext() throws SSLException {
when(aaiClientConfiguration.enableAaiCertAuth()).thenReturn(false);
+ when(sslFactory.createInsecureContext()).thenReturn(dummySslContext);
aaiReactiveWebClientFactory = new AaiReactiveWebClientFactory(sslFactory, aaiClientConfiguration);
Assertions.assertNotNull(aaiReactiveWebClientFactory.build());
verify(sslFactory).createInsecureContext();
}
- private void givenEnabledAaiCertAuthConfiguration() {
+ private void givenEnabledAaiCertAuthConfiguration() throws SSLException {
when(aaiClientConfiguration.enableAaiCertAuth()).thenReturn(true);
when(aaiClientConfiguration.trustStorePath()).thenReturn(TRUST_STORE_PATH);
when(aaiClientConfiguration.trustStorePasswordPath()).thenReturn(TRUST_STORE_PASS_PATH);
when(aaiClientConfiguration.keyStorePath()).thenReturn(KEY_STORE_PATH);
when(aaiClientConfiguration.keyStorePasswordPath()).thenReturn(KEY_STORE_PASS_PATH);
+ when(sslFactory.createSecureContext(KEY_STORE_PATH, KEY_STORE_PASS_PATH, TRUST_STORE_PATH, TRUST_STORE_PASS_PATH))
+ .thenReturn(dummySslContext);
}
}
diff --git a/rest-services/cbs-client/pom.xml b/rest-services/cbs-client/pom.xml
index c6484ff5..e1656e74 100644
--- a/rest-services/cbs-client/pom.xml
+++ b/rest-services/cbs-client/pom.xml
@@ -7,13 +7,13 @@
<parent>
<groupId>org.onap.dcaegen2.services.sdk</groupId>
<artifactId>dcaegen2-services-sdk-rest-services</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.1.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
<artifactId>cbs-client</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.1.1-SNAPSHOT</version>
<name>dcaegen2-services-sdk-rest-services-cbs-client</name>
<description>Config Binding Service Rest Services Module</description>
diff --git a/rest-services/common-dependency/pom.xml b/rest-services/common-dependency/pom.xml
index 39cac5da..46e52f05 100644
--- a/rest-services/common-dependency/pom.xml
+++ b/rest-services/common-dependency/pom.xml
@@ -8,13 +8,13 @@
<parent>
<groupId>org.onap.dcaegen2.services.sdk</groupId>
<artifactId>dcaegen2-services-sdk-rest-services</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.1.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
<artifactId>common-dependency</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.1.1-SNAPSHOT</version>
<name>dcaegen2-services-sdk-rest-services-common-dependency</name>
<description>Common functionality in the project</description>
diff --git a/rest-services/dmaap-client/pom.xml b/rest-services/dmaap-client/pom.xml
index e34dfa17..ec916052 100644
--- a/rest-services/dmaap-client/pom.xml
+++ b/rest-services/dmaap-client/pom.xml
@@ -7,13 +7,13 @@
<parent>
<groupId>org.onap.dcaegen2.services.sdk</groupId>
<artifactId>dcaegen2-services-sdk-rest-services</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.1.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
<artifactId>dmaap-client</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.1.1-SNAPSHOT</version>
<name>dcaegen2-services-sdk-rest-services-dmaap-client</name>
<description>DMaaP Rest Services Module</description>
@@ -23,7 +23,7 @@
<dependency>
<groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
<artifactId>common-dependency</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
@@ -68,7 +68,7 @@
<dependency>
<groupId>org.onap.dcaegen2.services.sdk.rest.services</groupId>
<artifactId>aai-client</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.1.1-SNAPSHOT</version>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/rest-services/dmaap-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPReactiveWebClientFactoryTest.java b/rest-services/dmaap-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPReactiveWebClientFactoryTest.java
index d28bc5d7..d9989d1d 100644
--- a/rest-services/dmaap-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPReactiveWebClientFactoryTest.java
+++ b/rest-services/dmaap-client/src/test/java/org/onap/dcaegen2/services/sdk/rest/services/dmaap/client/service/consumer/DMaaPReactiveWebClientFactoryTest.java
@@ -24,6 +24,8 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
+import io.netty.handler.ssl.SslContext;
+import javax.net.ssl.SSLException;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.onap.dcaegen2.services.sdk.rest.services.dmaap.client.config.DmaapConsumerConfiguration;
@@ -40,6 +42,7 @@ class DMaaPReactiveWebClientFactoryTest {
private static final String TRUST_STORE = "trustStore";
private static final String TRUST_STORE_PASS = "trustStorePass";
private SslFactory sslFactory = mock(SslFactory.class);
+ private SslContext dummySslContext = mock(SslContext.class);
private DMaaPReactiveWebClientFactory webClientFactory = new DMaaPReactiveWebClientFactory(sslFactory);
@Test
@@ -68,19 +71,22 @@ class DMaaPReactiveWebClientFactoryTest {
verify(sslFactory).createSecureContext(KEY_STORE, KEY_STORE_PASS, TRUST_STORE, TRUST_STORE_PASS);
}
- private DmaapConsumerConfiguration givenDmaapConfigurationWithSslDisabled() {
+ private DmaapConsumerConfiguration givenDmaapConfigurationWithSslDisabled() throws SSLException {
DmaapConsumerConfiguration dmaapConsumerConfiguration = mock(DmaapConsumerConfiguration.class);
when(dmaapConsumerConfiguration.enableDmaapCertAuth()).thenReturn(false);
+ when(sslFactory.createInsecureContext()).thenReturn(dummySslContext);
return dmaapConsumerConfiguration;
}
- private DmaapConsumerConfiguration givenDmaapConfigurationWithSslEnabled() {
+ private DmaapConsumerConfiguration givenDmaapConfigurationWithSslEnabled() throws SSLException {
DmaapConsumerConfiguration dmaapConsumerConfiguration = mock(DmaapConsumerConfiguration.class);
when(dmaapConsumerConfiguration.enableDmaapCertAuth()).thenReturn(true);
when(dmaapConsumerConfiguration.keyStorePath()).thenReturn(KEY_STORE);
when(dmaapConsumerConfiguration.keyStorePasswordPath()).thenReturn(KEY_STORE_PASS);
when(dmaapConsumerConfiguration.trustStorePath()).thenReturn(TRUST_STORE);
when(dmaapConsumerConfiguration.trustStorePasswordPath()).thenReturn(TRUST_STORE_PASS);
+ when(sslFactory.createSecureContext(KEY_STORE, KEY_STORE_PASS, TRUST_STORE, TRUST_STORE_PASS))
+ .thenReturn(dummySslContext);
return dmaapConsumerConfiguration;
}
} \ No newline at end of file
diff --git a/rest-services/pom.xml b/rest-services/pom.xml
index 101e4f92..4272fa1b 100644
--- a/rest-services/pom.xml
+++ b/rest-services/pom.xml
@@ -7,13 +7,13 @@
<parent>
<groupId>org.onap.dcaegen2.services</groupId>
<artifactId>sdk</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.1.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.onap.dcaegen2.services.sdk</groupId>
<artifactId>dcaegen2-services-sdk-rest-services</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.1.1-SNAPSHOT</version>
<name>dcaegen2-services-sdk-rest-services</name>
<description>Common SDK repo for all DCAE Services (R4)</description>