summaryrefslogtreecommitdiffstats
path: root/src/test/java/org
diff options
context:
space:
mode:
authorTian Lee <TianL@amdocs.com>2019-04-03 10:34:37 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-03 10:34:37 +0000
commit6b52f93a1965dfadd55410a4231446c9fb374633 (patch)
treef3d18ecc852626f917ce3a9d5c318f804812177a /src/test/java/org
parenta7601b88fcb8abb0a40d26d16948b29ae45d370d (diff)
parent61607b8e66f19aba46d0c0f7cec3a9fe2c6e1e08 (diff)
Merge "Move REQUIRE_CLIENT_AUTH code to start script"
Diffstat (limited to 'src/test/java/org')
-rw-r--r--src/test/java/org/onap/aai/babel/TestApplication.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/java/org/onap/aai/babel/TestApplication.java b/src/test/java/org/onap/aai/babel/TestApplication.java
index 8c9ca5e..bb43b40 100644
--- a/src/test/java/org/onap/aai/babel/TestApplication.java
+++ b/src/test/java/org/onap/aai/babel/TestApplication.java
@@ -93,6 +93,20 @@ public class TestApplication {
BabelApplication.main(new String[] {});
}
+ /**
+ * This test asserts that if the KEY_STORE_PASSWORD System Property is set (and is not empty) then the value is
+ * passed to Jetty, debobfuscated, and used to open the key store, even if the resulting password value is actually
+ * an empty string.
+ */
+ @Test
+ public void testApplicationWithBlankObfuscatedKeyStorePassword() {
+ // Note that "OBF:" is correctly deobfuscated and results in an empty string.
+ System.setProperty("KEY_STORE_PASSWORD", "OBF:");
+ final CauseMatcher expectedCause = new CauseMatcher(IOException.class, "password was incorrect");
+ expectedEx.expectCause(expectedCause);
+ BabelApplication.main(new String[] {});
+ }
+
private static class CauseMatcher extends TypeSafeMatcher<Throwable> {
private final Class<? extends Throwable> type;