diff options
author | Joanna Jeremicz <joanna.jeremicz@nokia.com> | 2020-03-05 08:28:31 +0100 |
---|---|---|
committer | Joanna Jeremicz <joanna.jeremicz@nokia.com> | 2020-03-05 08:28:31 +0100 |
commit | b3d3b52b0734196e73268e44be00e65d4926aa5a (patch) | |
tree | 26ceb1f6ca957c1d04b0513377a2f3174cb465d1 /prh-app-server/src/test/java | |
parent | 8d6fec35a2c710105da6ea8f0b732b786b4ff1e3 (diff) |
PRH error after PNF relocation
Path should be encoded before it is used as URL
Change-Id: I408064245d9f56ea7925bc5a882ed42d8c84f191
Issue-ID: DCAEGEN2-2088
Signed-off-by: Joanna Jeremicz <joanna.jeremicz@nokia.com>
Diffstat (limited to 'prh-app-server/src/test/java')
-rw-r--r-- | prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskTest.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskTest.java b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskTest.java index bc754bf8..f060ac7b 100644 --- a/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskTest.java +++ b/prh-app-server/src/test/java/org/onap/dcaegen2/services/prh/tasks/BbsActionsTaskTest.java @@ -66,6 +66,7 @@ class BbsActionsTaskTest { private static final String PNF_WITH_LINK_JSON = "BbsActionsTaskTestFiles/pnfWithLogicalLink.json"; private static final String LOGICAL_LINK_JSON = "BbsActionsTaskTestFiles/oldLogicalLink.json"; private static final String LOGICAL_LINK_BODY = "BbsActionsTaskTestFiles/logicalLinkBody.json"; + private static final String LOGICAL_LINK_BODY_WITH_SPACE = "BbsActionsTaskTestFiles/logicalLinkBodyWithSpace.json"; private CbsConfiguration cbsConfiguration = mock(CbsConfiguration.class); @@ -111,7 +112,8 @@ class BbsActionsTaskTest { given(cbsConfiguration.getAaiClientConfiguration()).willReturn(aaiClientConfiguration); JsonObject additionalFields = new JsonObject(); - String linkName = "some-link"; + String linkName = "some link"; + String encodedLinkName = "some%20link"; additionalFields.addProperty(ATTACHMENT_POINT, linkName); ConsumerDmaapModel consumerDmaapModel = buildConsumerDmaapModel(additionalFields); @@ -136,9 +138,9 @@ class BbsActionsTaskTest { assertEquals(AAI_URL + PNF_URL + "/Nokia123", pnfGet.url()); assertEquals(GET, pnfGet.method()); - assertEquals(AAI_URL + LOGICAL_LINK_URL + "/" + linkName, linkPut.url()); + assertEquals(AAI_URL + LOGICAL_LINK_URL + "/" + encodedLinkName, linkPut.url()); assertEquals(PUT, linkPut.method()); - assertEquals(getBodyJson(LOGICAL_LINK_BODY), extractBodyFromRequest(linkPut)); + assertEquals(getBodyJson(LOGICAL_LINK_BODY_WITH_SPACE), extractBodyFromRequest(linkPut)); } @Test |