diff options
author | mpriyank <priyank.maheshwari@est.tech> | 2023-03-21 09:59:00 +0000 |
---|---|---|
committer | mpriyank <priyank.maheshwari@est.tech> | 2023-03-21 11:08:19 +0000 |
commit | bdf609572b2a62df00e044f4bae38e4c6c8ce4e7 (patch) | |
tree | 17eb820b58184f0ae7b586ed9bbb0a461c960773 /cps-ncmp-service/src/test/groovy | |
parent | 0b00f81b98e5fa9632b1145e49f62d0b2712f4e4 (diff) |
Add event to mapper as well
- Explicitly add event to the mapper
- Also parameterized the cm-events topic to be overridden later
Issue-ID: CPS-1554
Change-Id: Ia6e75117dbb4214648d40318989c4c5fe6fd69f1
Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
Diffstat (limited to 'cps-ncmp-service/src/test/groovy')
-rw-r--r-- | cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/notifications/avc/AvcEventProducerIntegrationSpec.groovy | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/notifications/avc/AvcEventProducerIntegrationSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/notifications/avc/AvcEventProducerIntegrationSpec.groovy index 744737080b..a251ecbf0b 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/notifications/avc/AvcEventProducerIntegrationSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/notifications/avc/AvcEventProducerIntegrationSpec.groovy @@ -56,8 +56,10 @@ class AvcEventProducerIntegrationSpec extends MessagingBaseSpec { def kafkaConsumer = new KafkaConsumer<>(consumerConfigProperties('ncmp-group')) def 'Consume and forward valid message'() { - given: 'consumer has a subscription' - kafkaConsumer.subscribe(['cm-events'] as List<String>) + given: 'consumer has a subscription on a topic' + def cmEventsTopic = 'cm-events' + avcEventProducer.cmEventsTopic = cmEventsTopic + kafkaConsumer.subscribe([cmEventsTopic] as List<String>) and: 'an event is sent' def jsonData = TestUtils.getResourceFileContent('sampleAvcInputEvent.json') def testEventSent = jsonObjectMapper.convertJsonString(jsonData, AvcEvent.class) |