summaryrefslogtreecommitdiffstats
path: root/prh-commons/src/test
diff options
context:
space:
mode:
authorpwielebs <piotr.wielebski@nokia.com>2018-09-14 16:43:00 +0200
committerpwielebs <piotr.wielebski@nokia.com>2018-09-14 16:44:34 +0200
commitcf8e9ac4d54b9deb7a8411fa2a3035fb706769d8 (patch)
tree71a540151a20ddefbbc4b5caf4be93137f47835f /prh-commons/src/test
parent3799b36b4cd0a342eafcf388eed7facbc9a17d50 (diff)
Bug fix 'sourceName' -> 'correlationId'
In case of PNF_REGISTRATION event components like SO and Dmaap are expecting to get 'correlationId' parameter rather than 'sourceName'. This change simply maps 'sourceName' to 'correlationId' Change-Id: Ic99ffc6cd61a76f1a8c46c50da7c16660b1b7acf Issue-ID: DCAEGEN2-744 Signed-off-by: pwielebs <piotr.wielebski@nokia.com>
Diffstat (limited to 'prh-commons/src/test')
-rw-r--r--prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/CommonFunctionsTest.java2
-rw-r--r--prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/ConsumerDmaapModelTest.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/CommonFunctionsTest.java b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/CommonFunctionsTest.java
index 90b32a09..b1cc01a6 100644
--- a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/CommonFunctionsTest.java
+++ b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/CommonFunctionsTest.java
@@ -28,7 +28,7 @@ class CommonFunctionsTest {
@Test
void createJsonBody_shouldReturnJsonInString() {
- String expectedResult = "{\"sourceName\":\"NOKnhfsadhff\",\"ipaddress-v4-oam\":\"256.22.33.155\""
+ String expectedResult = "{\"correlationId\":\"NOKnhfsadhff\",\"ipaddress-v4-oam\":\"256.22.33.155\""
+ ",\"ipaddress-v6-oam\":\"2001:0db8:85a3:0000:0000:8a2e:0370:7334\"}";
assertEquals(expectedResult, CommonFunctions.createJsonBody(new ConsumerDmaapModelForUnitTest()));
}
diff --git a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/ConsumerDmaapModelTest.java b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/ConsumerDmaapModelTest.java
index ed8d5293..4c4c345f 100644
--- a/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/ConsumerDmaapModelTest.java
+++ b/prh-commons/src/test/java/org/onap/dcaegen2/services/prh/model/ConsumerDmaapModelTest.java
@@ -34,14 +34,14 @@ class ConsumerDmaapModelTest {
String ipv4 = "11.22.33.155";
String ipv6 = "2001:0db8:85a3:0000:0000:8a2e:0370:7334";
ConsumerDmaapModel consumerDmaapModel = ImmutableConsumerDmaapModel.builder()
- .sourceName(sourceName)
+ .correlationId(sourceName)
.ipv4(ipv4)
.ipv6(ipv6)
.build();
// Then
Assertions.assertNotNull(consumerDmaapModel);
- Assertions.assertEquals(sourceName, consumerDmaapModel.getSourceName());
+ Assertions.assertEquals(sourceName, consumerDmaapModel.getCorrelationId());
Assertions.assertEquals(ipv4, consumerDmaapModel.getIpv4());
Assertions.assertEquals(ipv6, consumerDmaapModel.getIpv6());
}