aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java
diff options
context:
space:
mode:
authorDaniel Silverthorn <daniel.silverthorn@amdocs.com>2018-12-11 13:07:50 -0500
committerDaniel Silverthorn <daniel.silverthorn@amdocs.com>2018-12-11 13:12:49 -0500
commit17b7235cdaca01a6d50d0b2bda6ceb2a239b8862 (patch)
treec3153aa8d964618a73190eabddb99e178f7e2974 /src/test/java
parentecdc4859a0eaf97db959b1064b1060e392fe1bf4 (diff)
Handle non-obfuscated config
Change-Id: I5c57fcc16a93881af5cdf33947967e0d7ef2dd33 Issue-ID: AAI-1997 Signed-off-by: Daniel Silverthorn <daniel.silverthorn@amdocs.com>
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/org/onap/aai/modelloader/config/TestModelLoaderConfig.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/java/org/onap/aai/modelloader/config/TestModelLoaderConfig.java b/src/test/java/org/onap/aai/modelloader/config/TestModelLoaderConfig.java
index bfd793a..5243ac5 100644
--- a/src/test/java/org/onap/aai/modelloader/config/TestModelLoaderConfig.java
+++ b/src/test/java/org/onap/aai/modelloader/config/TestModelLoaderConfig.java
@@ -78,6 +78,9 @@ public class TestModelLoaderConfig {
ModelLoaderConfig config =
createObfuscatedTestConfig(ModelLoaderConfig.PROP_ML_DISTRIBUTION_PASSWORD, password);
assertEquals(password, config.getPassword());
+
+ config = createUnobfuscatedTestConfig(ModelLoaderConfig.PROP_ML_DISTRIBUTION_PASSWORD, password);
+ assertEquals(password, config.getPassword());
}
@Test
@@ -86,6 +89,9 @@ public class TestModelLoaderConfig {
ModelLoaderConfig config =
createObfuscatedTestConfig(ModelLoaderConfig.PROP_ML_DISTRIBUTION_KEYSTORE_PASSWORD, password);
assertEquals(password, config.getKeyStorePassword());
+
+ config = createUnobfuscatedTestConfig(ModelLoaderConfig.PROP_ML_DISTRIBUTION_KEYSTORE_PASSWORD, password);
+ assertEquals(password, config.getKeyStorePassword());
}
@Test
@@ -94,6 +100,9 @@ public class TestModelLoaderConfig {
ModelLoaderConfig config =
createObfuscatedTestConfig(ModelLoaderConfig.PROP_AAI_AUTHENTICATION_PASSWORD, password);
assertEquals(password, config.getAaiAuthenticationPassword());
+
+ config = createUnobfuscatedTestConfig(ModelLoaderConfig.PROP_AAI_AUTHENTICATION_PASSWORD, password);
+ assertEquals(password, config.getAaiAuthenticationPassword());
}
@Test
@@ -101,6 +110,9 @@ public class TestModelLoaderConfig {
String password = "myvoiceismypassword";
ModelLoaderConfig config = createObfuscatedTestConfig(ModelLoaderConfig.PROP_AAI_KEYSTORE_PASSWORD, password);
assertEquals(password, config.getAaiKeyStorePassword());
+
+ config = createUnobfuscatedTestConfig(ModelLoaderConfig.PROP_AAI_KEYSTORE_PASSWORD, password);
+ assertEquals(password, config.getAaiKeyStorePassword());
}
@Test
@@ -117,6 +129,9 @@ public class TestModelLoaderConfig {
String password = "babelpassword";
ModelLoaderConfig config = createObfuscatedTestConfig(ModelLoaderConfig.PROP_BABEL_KEYSTORE_PASSWORD, password);
assertEquals(password, config.getBabelKeyStorePassword());
+
+ config = createUnobfuscatedTestConfig(ModelLoaderConfig.PROP_BABEL_KEYSTORE_PASSWORD, password);
+ assertEquals(password, config.getBabelKeyStorePassword());
}
@Test
@@ -190,4 +205,10 @@ public class TestModelLoaderConfig {
props.put(propertyName, Password.obfuscate(propertyValue));
return new ModelLoaderConfig(props, null);
}
+
+ private ModelLoaderConfig createUnobfuscatedTestConfig(String propertyName, String propertyValue) {
+ Properties props = new Properties();
+ props.put(propertyName, propertyValue);
+ return new ModelLoaderConfig(props, null);
+ }
}