aboutsummaryrefslogtreecommitdiffstats
path: root/prh-dmaap-client/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'prh-dmaap-client/src/test')
-rw-r--r--prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/config/DmaapConsumerConfigurationTest.java25
-rw-r--r--prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/config/DmaapPublisherConfigurationTest.java24
-rw-r--r--prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/consumer/DMaaPReactiveWebClientFactoryTest.java8
3 files changed, 27 insertions, 30 deletions
diff --git a/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/config/DmaapConsumerConfigurationTest.java b/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/config/DmaapConsumerConfigurationTest.java
index 01d470a0..54193edd 100644
--- a/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/config/DmaapConsumerConfigurationTest.java
+++ b/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/config/DmaapConsumerConfigurationTest.java
@@ -44,11 +44,10 @@ class DmaapConsumerConfigurationTest {
String consumerGroup = "other";
Integer timeoutMs = 1000;
Integer messageLimit = 1000;
- String keyFile = "keyFile";
- String trustStore = "trustStore";
- String trustStorePass = "trustPass";
- String keyStore = "keyStore";
- String keyStorePass = "keyPass";
+ String trustStorePath = "trustStorePath";
+ String trustStorePasswordPath = "trustStorePasswordPath";
+ String keyStorePath = "keyStorePath";
+ String keyStorePasswordPath = "keyStorePasswordPath";
Boolean enableDmaapCertAuth = true;
// When
@@ -64,11 +63,10 @@ class DmaapConsumerConfigurationTest {
.consumerGroup(consumerGroup)
.timeoutMs(timeoutMs)
.messageLimit(messageLimit)
- .keyFile(keyFile)
- .trustStore(trustStore)
- .trustStorePassword(trustStorePass)
- .keyStore(keyStore)
- .keyStorePassword(keyStorePass)
+ .trustStorePath(trustStorePath)
+ .trustStorePasswordPath(trustStorePasswordPath)
+ .keyStorePath(keyStorePath)
+ .keyStorePasswordPath(keyStorePasswordPath)
.enableDmaapCertAuth(enableDmaapCertAuth)
.build();
@@ -76,9 +74,10 @@ class DmaapConsumerConfigurationTest {
assertEquals("DmaapConsumerConfiguration{"
+ "consumerId=1, consumerGroup=other, timeoutMs=1000, messageLimit=1000, dmaapHostName=localhost, "
+ "dmaapPortNumber=2222, dmaapTopicName=temp, dmaapProtocol=http, dmaapUserName=admin, "
- + "dmaapUserPassword=admin, dmaapContentType=application/json, keyFile=keyFile, "
- + "trustStore=trustStore, trustStorePassword=trustPass, keyStore=keyStore, "
- + "keyStorePassword=keyPass, enableDmaapCertAuth=true}", configuration.toString());
+ + "dmaapUserPassword=admin, dmaapContentType=application/json, "
+ + "trustStorePath=trustStorePath, trustStorePasswordPath=trustStorePasswordPath, "
+ + "keyStorePath=keyStorePath, keyStorePasswordPath=keyStorePasswordPath, enableDmaapCertAuth=true}",
+ configuration.toString());
}
}
diff --git a/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/config/DmaapPublisherConfigurationTest.java b/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/config/DmaapPublisherConfigurationTest.java
index d6471381..472abec5 100644
--- a/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/config/DmaapPublisherConfigurationTest.java
+++ b/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/config/DmaapPublisherConfigurationTest.java
@@ -41,11 +41,10 @@ class DmaapPublisherConfigurationTest {
String dmaapUserName = "admin";
String dmaapUserPassword = "admin";
String dmaapContentType = "application/json";
- String keyFile = "keyFile";
- String trustStore = "trustStore";
- String trustStorePass = "trustPass";
- String keyStore = "keyStore";
- String keyStorePass = "keyPass";
+ String trustStorePath = "trustStorePath";
+ String trustStorePasswordPath = "trustStorePasswordPath";
+ String keyStorePath = "keyStorePath";
+ String keyStorePasswordPath = "keyStorePasswordPath";
Boolean enableDmaapCertAuth = true;
// When
@@ -57,19 +56,18 @@ class DmaapPublisherConfigurationTest {
.dmaapUserName(dmaapUserName)
.dmaapUserPassword(dmaapUserPassword)
.dmaapContentType(dmaapContentType)
- .keyFile(keyFile)
- .trustStore(trustStore)
- .trustStorePassword(trustStorePass)
- .keyStore(keyStore)
- .keyStorePassword(keyStorePass)
+ .trustStorePath(trustStorePath)
+ .trustStorePasswordPath(trustStorePasswordPath)
+ .keyStorePath(keyStorePath)
+ .keyStorePasswordPath(keyStorePasswordPath)
.enableDmaapCertAuth(enableDmaapCertAuth)
.build();
// Then
assertEquals("DmaapPublisherConfiguration{dmaapHostName=localhost, dmaapPortNumber=2222, "
+ "dmaapTopicName=temp, dmaapProtocol=http, dmaapUserName=admin, dmaapUserPassword=admin, "
- + "dmaapContentType=application/json, keyFile=keyFile, trustStore=trustStore, "
- + "trustStorePassword=trustPass, keyStore=keyStore, keyStorePassword=keyPass, "
- + "enableDmaapCertAuth=true}", configuration.toString());
+ + "dmaapContentType=application/json, trustStorePath=trustStorePath, "
+ + "trustStorePasswordPath=trustStorePasswordPath, keyStorePath=keyStorePath, "
+ + "keyStorePasswordPath=keyStorePasswordPath, enableDmaapCertAuth=true}", configuration.toString());
}
}
diff --git a/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/consumer/DMaaPReactiveWebClientFactoryTest.java b/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/consumer/DMaaPReactiveWebClientFactoryTest.java
index 887d5d33..b2cd84c6 100644
--- a/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/consumer/DMaaPReactiveWebClientFactoryTest.java
+++ b/prh-dmaap-client/src/test/java/org/onap/dcaegen2/services/prh/service/consumer/DMaaPReactiveWebClientFactoryTest.java
@@ -77,10 +77,10 @@ class DMaaPReactiveWebClientFactoryTest {
private DmaapConsumerConfiguration givenDmaapConfigurationWithSslEnabled() {
DmaapConsumerConfiguration dmaapConsumerConfiguration = mock(DmaapConsumerConfiguration.class);
when(dmaapConsumerConfiguration.enableDmaapCertAuth()).thenReturn(true);
- when(dmaapConsumerConfiguration.keyStore()).thenReturn(KEY_STORE);
- when(dmaapConsumerConfiguration.keyStorePassword()).thenReturn(KEY_STORE_PASS);
- when(dmaapConsumerConfiguration.trustStore()).thenReturn(TRUST_STORE);
- when(dmaapConsumerConfiguration.trustStorePassword()).thenReturn(TRUST_STORE_PASS);
+ 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);
return dmaapConsumerConfiguration;
}
} \ No newline at end of file