aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/onap/dcae/ApplicationSettingsTest.java19
-rw-r--r--src/test/java/org/onap/dcae/TLSTest.java1
-rw-r--r--src/test/java/org/onap/dcae/controller/ConfigLoaderIntegrationE2ETest.java10
3 files changed, 6 insertions, 24 deletions
diff --git a/src/test/java/org/onap/dcae/ApplicationSettingsTest.java b/src/test/java/org/onap/dcae/ApplicationSettingsTest.java
index 0e91bc70..646d3e52 100644
--- a/src/test/java/org/onap/dcae/ApplicationSettingsTest.java
+++ b/src/test/java/org/onap/dcae/ApplicationSettingsTest.java
@@ -215,25 +215,6 @@ public class ApplicationSettingsTest {
assertEquals(sanitizePath("etc/keystore"), keystoreFileLocation);
}
-
- @Test
- public void shouldReturnKeystoreAlias() throws IOException {
- // when
- String keystoreAlias = fromTemporaryConfiguration("collector.keystore.alias=alias").keystoreAlias();
-
- // then
- assertEquals("alias", keystoreAlias);
- }
-
- @Test
- public void shouldReturnDefaultKeystoreAlias() throws IOException {
- // when
- String keystoreAlias = fromTemporaryConfiguration().keystoreAlias();
-
- // then
- assertEquals("tomcat", keystoreAlias);
- }
-
@Test
public void shouldReturnDMAAPConfigFileLocation() throws IOException {
// when
diff --git a/src/test/java/org/onap/dcae/TLSTest.java b/src/test/java/org/onap/dcae/TLSTest.java
index c73bb53b..e088df28 100644
--- a/src/test/java/org/onap/dcae/TLSTest.java
+++ b/src/test/java/org/onap/dcae/TLSTest.java
@@ -109,7 +109,6 @@ public class TLSTest extends TLSTestBase {
@Override
protected void configureSettings(ApplicationSettings settings) {
- when(settings.keystoreAlias()).thenReturn(KEYSTORE_ALIAS);
when(settings.keystoreFileLocation()).thenReturn(KEYSTORE.toString());
when(settings.keystorePasswordFileLocation()).thenReturn(KEYSTORE_PASSWORD_FILE.toString());
when(settings.authorizationEnabled()).thenReturn(true);
diff --git a/src/test/java/org/onap/dcae/controller/ConfigLoaderIntegrationE2ETest.java b/src/test/java/org/onap/dcae/controller/ConfigLoaderIntegrationE2ETest.java
index b0a984a0..90c8a9c8 100644
--- a/src/test/java/org/onap/dcae/controller/ConfigLoaderIntegrationE2ETest.java
+++ b/src/test/java/org/onap/dcae/controller/ConfigLoaderIntegrationE2ETest.java
@@ -22,11 +22,11 @@ package org.onap.dcae.controller;
import static io.vavr.API.Map;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyZeroInteractions;
+import static org.mockito.Mockito.when;
import static org.onap.dcae.TestingUtilities.createTemporaryFile;
import static org.onap.dcae.TestingUtilities.readFile;
import static org.onap.dcae.TestingUtilities.readJSONFromFile;
@@ -36,10 +36,15 @@ import java.nio.file.Path;
import java.nio.file.Paths;
import org.json.JSONObject;
import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.junit.MockitoJUnitRunner;
+import org.onap.dcae.ApplicationSettings;
import org.onap.dcae.WiremockBasedTest;
import org.onap.dcae.common.publishing.DMaaPConfigurationParser;
import org.onap.dcae.common.publishing.EventPublisher;
+@RunWith(MockitoJUnitRunner.Silent.class)
public class ConfigLoaderIntegrationE2ETest extends WiremockBasedTest {
@Test
@@ -54,11 +59,8 @@ public class ConfigLoaderIntegrationE2ETest extends WiremockBasedTest {
EventPublisher eventPublisherMock = mock(EventPublisher.class);
ConfigFilesFacade configFilesFacade = new ConfigFilesFacade(dMaaPConfigFile, collectorPropertiesFile);
-
- // when
ConfigLoader configLoader = new ConfigLoader(eventPublisherMock::reconfigure, configFilesFacade, ConfigSource::getAppConfig, () -> wiremockBasedEnvProps());
configLoader.updateConfig();
-
// then
assertThat(readJSONFromFile(dMaaPConfigSource).toString()).isEqualTo(dMaaPConf.toString());
assertThat(readFile(collectorPropertiesFile).trim()).isEqualTo("collector.port = 8080");