diff options
author | Vijay Venkatesh Kumar <vv770d@att.com> | 2019-03-02 05:13:27 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-03-02 05:13:27 +0000 |
commit | 01cf3b35295bfee2c9b27d97d1c6a53f6872a350 (patch) | |
tree | 64b1c6dba88fc147d62c16cc227c200bdf8572b3 /src/test/java/org | |
parent | 356715b370e80e7f9337b916793404a14bc3d658 (diff) | |
parent | e7360f7e7e77672b885087af68a3d96ebbc8c313 (diff) |
Merge "Restart Issue"
Diffstat (limited to 'src/test/java/org')
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"); |