diff options
author | Piotr Jaszczyk <piotr.jaszczyk@nokia.com> | 2018-10-03 10:33:40 +0200 |
---|---|---|
committer | Piotr Jaszczyk <piotr.jaszczyk@nokia.com> | 2018-10-03 13:23:36 +0200 |
commit | de8e834e2bfc714e7a588f7470fe2ef7ba368275 (patch) | |
tree | 91c8f15bb5e4c5817a78c966da16a7717675b6c0 /hv-collector-core | |
parent | fd44b433ac9825be6cc654e8a566f9d0bfc70166 (diff) |
Change domain to lower case
Change-Id: I097def2ba720fafe0a1e1a88e87f8c03663627c9
Issue-ID: DCAEGEN2-847
Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
Diffstat (limited to 'hv-collector-core')
2 files changed, 17 insertions, 8 deletions
diff --git a/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/RouterTest.kt b/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/RouterTest.kt index 5195948e..e8a31231 100644 --- a/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/RouterTest.kt +++ b/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/RouterTest.kt @@ -45,13 +45,13 @@ object RouterTest : Spek({ val config = routing { defineRoute { - fromDomain(PERF3GPP.name) + fromDomain(PERF3GPP.domainName) toTopic("ves_rtpm") withFixedPartitioning(2) } defineRoute { - fromDomain(SYSLOG.name) + fromDomain(SYSLOG.domainName) toTopic("ves_trace") withFixedPartitioning() } diff --git a/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProviderTest.kt b/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProviderTest.kt index f21a2ecf..9a6889c8 100644 --- a/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProviderTest.kt +++ b/hv-collector-core/src/test/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProviderTest.kt @@ -22,6 +22,7 @@ package org.onap.dcae.collectors.veshv.impl.adapters import com.nhaarman.mockito_kotlin.eq import com.nhaarman.mockito_kotlin.mock import com.nhaarman.mockito_kotlin.whenever +import org.assertj.core.api.Assertions.assertThat import org.jetbrains.spek.api.Spek import org.jetbrains.spek.api.dsl.describe import org.jetbrains.spek.api.dsl.given @@ -67,12 +68,20 @@ internal object ConsulConfigurationProviderTest : Spek({ assertEquals("$kafkaAddress:9093", it.kafkaBootstrapServers) val route1 = it.routing.routes[0] - assertEquals(FAULT.name, route1.domain) - assertEquals("test-topic-1", route1.targetTopic) + assertThat(FAULT.domainName) + .describedAs("routed domain 1") + .isEqualTo(route1.domain) + assertThat("test-topic-1") + .describedAs("target topic 1") + .isEqualTo(route1.targetTopic) val route2 = it.routing.routes[1] - assertEquals(HEARTBEAT.name, route2.domain) - assertEquals("test-topic-2", route2.targetTopic) + assertThat(HEARTBEAT.domainName) + .describedAs("routed domain 2") + .isEqualTo(route2.domain) + assertThat("test-topic-2") + .describedAs("target topic 2") + .isEqualTo(route2.targetTopic) }.verifyComplete() } @@ -138,11 +147,11 @@ fun constructConsulResponse(): String { "dmaap.kafkaBootstrapServers": "$kafkaAddress:9093", "collector.routing": [ { - "fromDomain": "FAULT", + "fromDomain": "fault", "toTopic": "test-topic-1" }, { - "fromDomain": "HEARTBEAT", + "fromDomain": "heartbeat", "toTopic": "test-topic-2" } ] |