summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/onap/aai/validation/config/TestRestConfig.java5
-rw-r--r--src/test/java/org/onap/aai/validation/config/TestTopicAdminConfig.java5
-rw-r--r--src/test/java/org/onap/aai/validation/publisher/TestValidationEventPublisher.java5
-rw-r--r--src/test/resources/rest-config/aai-environment.properties4
4 files changed, 9 insertions, 10 deletions
diff --git a/src/test/java/org/onap/aai/validation/config/TestRestConfig.java b/src/test/java/org/onap/aai/validation/config/TestRestConfig.java
index 313c847..0c632ee 100644
--- a/src/test/java/org/onap/aai/validation/config/TestRestConfig.java
+++ b/src/test/java/org/onap/aai/validation/config/TestRestConfig.java
@@ -24,7 +24,6 @@ import static org.junit.Assert.assertTrue;
import javax.inject.Inject;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.onap.aai.validation.config.RestConfig;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -48,9 +47,9 @@ public class TestRestConfig {
expectedRestConfig.setProtocol("https");
expectedRestConfig.setBaseModelURI("${baseModelURI}");
expectedRestConfig.setTrustStorePath("/dir1/dir2/trustStorePath");
- expectedRestConfig.setTrustStorePassword("70c87528c88dcd9f9c2558d30e817868");
+ expectedRestConfig.setTrustStorePassword("OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o");
expectedRestConfig.setKeyStorePath("/dir1/dir2/keyStorePath");
- expectedRestConfig.setKeyStorePassword("70c87528c88dcd9f9c2558d30e817868");
+ expectedRestConfig.setKeyStorePassword("OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o");
expectedRestConfig.setKeyManagerFactoryAlgorithm("AES");
expectedRestConfig.setKeyStoreType("jks");
expectedRestConfig.setSecurityProtocol("TLS");
diff --git a/src/test/java/org/onap/aai/validation/config/TestTopicAdminConfig.java b/src/test/java/org/onap/aai/validation/config/TestTopicAdminConfig.java
index f6a6195..8e24f3a 100644
--- a/src/test/java/org/onap/aai/validation/config/TestTopicAdminConfig.java
+++ b/src/test/java/org/onap/aai/validation/config/TestTopicAdminConfig.java
@@ -24,7 +24,6 @@ import static org.junit.Assert.assertTrue;
import javax.inject.Inject;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.onap.aai.validation.config.TopicAdminConfig;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -44,9 +43,9 @@ public class TestTopicAdminConfig {
TopicAdminConfig expectedTopicAdminConfig = new TopicAdminConfig();
expectedTopicAdminConfig.setPublishEnable(true);
- expectedTopicAdminConfig.setPublishRetries(3l);
+ expectedTopicAdminConfig.setPublishRetries(3L);
expectedTopicAdminConfig.setConsumeEnable(true);
- expectedTopicAdminConfig.setConsumePollingIntervalSeconds(3l);
+ expectedTopicAdminConfig.setConsumePollingIntervalSeconds(3L);
assertThat(expectedTopicAdminConfig, is(topicAdminConfig));
assertThat(expectedTopicAdminConfig.hashCode(), is(topicAdminConfig.hashCode()));
diff --git a/src/test/java/org/onap/aai/validation/publisher/TestValidationEventPublisher.java b/src/test/java/org/onap/aai/validation/publisher/TestValidationEventPublisher.java
index 8950e63..604312e 100644
--- a/src/test/java/org/onap/aai/validation/publisher/TestValidationEventPublisher.java
+++ b/src/test/java/org/onap/aai/validation/publisher/TestValidationEventPublisher.java
@@ -31,6 +31,7 @@ import org.onap.aai.validation.publisher.ValidationEventPublisher;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import org.eclipse.jetty.util.security.Password;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -56,12 +57,12 @@ public class TestValidationEventPublisher {
TopicAdminConfig mockTopicAdminConfig = Mockito.mock(TopicAdminConfig.class);
when(mockTopicAdminConfig.isPublishEnable()).thenReturn(true);
- Topic topic1 = new TopicConfig("poa-rule-validation","poa-audit-result").new Topic();
+ Topic topic1 = mockTopicConfig.new Topic();
topic1.setName("aai-data-integrity");
topic1.setHost("integrity-dummy-host");
topic1.setPartition("integrity-dummy-partition");
topic1.setUsername("integrity-dummy-username");
- topic1.setPassword("integrity-dummy-password");
+ topic1.setPassword(Password.obfuscate("integrity-dummy-password"));
topic1.setTransportType("integrity-dummy-transport-type");
topicList.add(topic1);
diff --git a/src/test/resources/rest-config/aai-environment.properties b/src/test/resources/rest-config/aai-environment.properties
index 988ae90..adfe002 100644
--- a/src/test/resources/rest-config/aai-environment.properties
+++ b/src/test/resources/rest-config/aai-environment.properties
@@ -19,9 +19,9 @@ host=localhost
port=8080
httpProtocol=https
trustStorePath=/dir1/dir2/trustStorePath
-trustStorePassword.x=70c87528c88dcd9f9c2558d30e817868
+trustStorePassword.x=OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o
keyStorePath=/dir1/dir2/keyStorePath
-keyStorePassword.x=70c87528c88dcd9f9c2558d30e817868
+keyStorePassword.x=OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o
keyManagerFactoryAlgorithm=AES
keyStoreType=jks
securityProtocol=TLS