diff options
author | 2019-04-15 19:36:07 +0000 | |
---|---|---|
committer | 2019-04-15 19:36:07 +0000 | |
commit | ff4bf8d97be17232187dfdbb5fc913d015b3b213 (patch) | |
tree | 7623c7de4b4d14eb21fae2ff7c5a9b34722f1571 /src/test | |
parent | 4d4540de666c02754b4c35bb4a27a6c99c437f83 (diff) | |
parent | a6ffdd5cb52d61792dfe8e233620b34098a5fb37 (diff) |
Merge "Collector authentication enhancement"
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/org/onap/dcae/TLSTest.java | 1 | ||||
-rw-r--r-- | src/test/java/org/onap/dcae/TLSTestBase.java | 3 | ||||
-rw-r--r-- | src/test/resources/certSubjectMatcher | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/src/test/java/org/onap/dcae/TLSTest.java b/src/test/java/org/onap/dcae/TLSTest.java index b1f90371..3cf0a162 100644 --- a/src/test/java/org/onap/dcae/TLSTest.java +++ b/src/test/java/org/onap/dcae/TLSTest.java @@ -125,6 +125,7 @@ public class TLSTest extends TLSTestBase { when(settings.authMethod()).thenReturn(AuthMethodType.CERT_ONLY.value()); when(settings.truststoreFileLocation()).thenReturn(TRUSTSTORE.toString()); when(settings.truststorePasswordFileLocation()).thenReturn(TRUSTSTORE_PASSWORD_FILE.toString()); + when(settings.certSubjectMatcher()).thenReturn(CERT_SUBJECT_MATCHER.toString()); } } diff --git a/src/test/java/org/onap/dcae/TLSTestBase.java b/src/test/java/org/onap/dcae/TLSTestBase.java index 8b486ec7..4dada129 100644 --- a/src/test/java/org/onap/dcae/TLSTestBase.java +++ b/src/test/java/org/onap/dcae/TLSTestBase.java @@ -45,12 +45,12 @@ import static org.onap.dcae.TestingUtilities.*; @Configuration @ExtendWith(SpringExtension.class) public class TLSTestBase { - protected static final String KEYSTORE_ALIAS = "localhost"; protected static final Path RESOURCES = Paths.get("src", "test", "resources"); protected static final Path KEYSTORE = Paths.get(RESOURCES.toString(), "keystore"); protected static final Path KEYSTORE_PASSWORD_FILE = Paths.get(RESOURCES.toString(), "passwordfile"); protected static final Path TRUSTSTORE = Paths.get(RESOURCES.toString(), "truststore"); protected static final Path TRUSTSTORE_PASSWORD_FILE = Paths.get(RESOURCES.toString(), "trustpasswordfile"); + protected static final Path CERT_SUBJECT_MATCHER = Paths.get(RESOURCES.toString(), "certSubjectMatcher"); protected static abstract class ConfigurationBase { protected final ApplicationSettings settings = Mockito.mock(ApplicationSettings.class); @@ -67,6 +67,7 @@ public class TLSTestBase { @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) protected abstract class TestClassBase { + @MockBean @Qualifier("inputQueue") protected LinkedBlockingQueue<JSONObject> queue; diff --git a/src/test/resources/certSubjectMatcher b/src/test/resources/certSubjectMatcher new file mode 100644 index 00000000..9abb766c --- /dev/null +++ b/src/test/resources/certSubjectMatcher @@ -0,0 +1 @@ +.*
\ No newline at end of file |