diff options
author | Zlatko Murgoski <zlatko.murgoski@nokia.com> | 2019-02-04 09:27:00 +0100 |
---|---|---|
committer | Zlatko Murgoski <zlatko.murgoski@nokia.com> | 2019-03-01 07:50:28 +0100 |
commit | e7360f7e7e77672b885087af68a3d96ebbc8c313 (patch) | |
tree | 8316d86334ec400b48f5a7a6a862fe7ffd9b9867 /src/test/java/org | |
parent | 8971ae1e6ccc99811663652819206231065b1755 (diff) |
Restart Issue
Restart Issue
Issue-ID: DCAEGEN2-1104
Change-Id: Iac1ee2f79be00084f5c0cd963503d54d7d6e6cb9
Signed-off-by: Zlatko Murgoski <zlatko.murgoski@nokia.com>
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"); |