diff options
author | Jakub Dudycz <jakub.dudycz@nokia.com> | 2018-07-23 14:51:00 +0200 |
---|---|---|
committer | Piotr Jaszczyk <piotr.jaszczyk@nokia.com> | 2018-08-03 08:51:17 +0200 |
commit | 53dbf8e66ad83c2d5f06279a0d7446e5e8be68e8 (patch) | |
tree | 44bdf2a4845440372fe8d63c40cb3112add2727f /hv-collector-xnf-simulator/src/test | |
parent | a2d18b375631d010432089ed18db327c9e4f26bf (diff) |
Configure xnf simulator api listen port
Closes ONAP-664
Closes ONAP-647
Change-Id: I8d1e57c0c66f1968925660fe47fa96a2a634c039
Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com>
Issue-ID: DCAEGEN2-601
Diffstat (limited to 'hv-collector-xnf-simulator/src/test')
-rw-r--r-- | hv-collector-xnf-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/main/config/ArgConfigurationProviderTest.kt | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/hv-collector-xnf-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/main/config/ArgConfigurationProviderTest.kt b/hv-collector-xnf-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/main/config/ArgConfigurationProviderTest.kt index fccd8b5a..04d81c74 100644 --- a/hv-collector-xnf-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/main/config/ArgConfigurationProviderTest.kt +++ b/hv-collector-xnf-simulator/src/test/kotlin/org/onap/dcae/collectors/veshv/main/config/ArgConfigurationProviderTest.kt @@ -28,7 +28,7 @@ import org.jetbrains.spek.api.dsl.it import org.jetbrains.spek.api.dsl.on import org.onap.dcae.collectors.veshv.domain.SecurityConfiguration import org.onap.dcae.collectors.veshv.simulators.xnf.config.ArgConfigurationProvider -import org.onap.dcae.collectors.veshv.simulators.xnf.config.ArgConfigurationProvider.* +import org.onap.dcae.collectors.veshv.simulators.xnf.config.ArgConfigurationProvider.DefaultValues import org.onap.dcae.collectors.veshv.simulators.xnf.config.SimulatorConfiguration import java.nio.file.Paths import kotlin.test.assertTrue @@ -36,7 +36,6 @@ import kotlin.test.assertTrue object ArgConfigurationProviderTest : Spek({ lateinit var cut: ArgConfigurationProvider - val messagesAmount = 3L val vesHost = "localhosting" val pk = Paths.get("/", "etc", "ves", "pk.pem") val cert = Paths.get("/", "etc", "ssl", "certs", "ca-bundle.crt") @@ -61,7 +60,6 @@ object ArgConfigurationProviderTest : Spek({ result = parse("--ssl-disable", "--ves-port", "6969", "--ves-host", vesHost, - "--messages", messagesAmount.toString(), "--private-key-file", pk.toFile().absolutePath, "--cert-file", cert.toFile().absolutePath, "--trust-cert-file", trustCert.toFile().absolutePath) @@ -71,11 +69,6 @@ object ArgConfigurationProviderTest : Spek({ assertThat(result.vesPort).isEqualTo(6969) } - - it("should set proper config url") { - assertThat(result.messagesAmount).isEqualTo(messagesAmount) - } - it("should set proper security configuration") { assertThat(result.security).isEqualTo( SecurityConfiguration(sslDisable = true, privateKey = pk, cert = cert, trustedCert = trustCert) @@ -86,26 +79,18 @@ object ArgConfigurationProviderTest : Spek({ given("some parameters are present in the short form") { beforeEachTest { - result = parse("-h", "ves-hv", "--ves-port", "666", "-m", messagesAmount.toString()) + result = parse("-h", "ves-hv", "--ves-port", "666") } it("should set proper port") { assertThat(result.vesPort).isEqualTo(666) } - - it("should set proper messages amount") { - assertThat(result.messagesAmount).isEqualTo(messagesAmount) - } } given("all optional parameters are absent") { beforeEachTest { - result = parse("-h", "ves-hv", "-p", "666") - } - - it("should set default messages amount") { - assertThat(result.messagesAmount).isEqualTo(DefaultValues.MESSAGES_AMOUNT) + result = parse("-h", "ves-hv", "-v", "666") } on("security config") { @@ -130,7 +115,6 @@ object ArgConfigurationProviderTest : Spek({ result = parse("--ssl-disable", "--ves-port", "888", "--ves-host", vesHost, - "--messages", messagesAmount.toString(), "--private-key-file", pk.toFile().absolutePath, "--cert-file", cert.toFile().absolutePath, "--trust-cert-file", trustCert.toFile().absolutePath) @@ -139,7 +123,7 @@ object ArgConfigurationProviderTest : Spek({ on("security config") { val securityConfiguration = result.security - it("should set ssl disable to true"){ + it("should set ssl disable to true") { assertTrue(securityConfiguration.sslDisable) } |