aboutsummaryrefslogtreecommitdiffstats
path: root/cps-tbdmt-service/src
diff options
context:
space:
mode:
authorNiranjana <niranjana.y60@wipro.com>2021-11-02 05:27:17 +0000
committerNiranjana <niranjana.y60@wipro.com>2021-11-02 05:27:17 +0000
commitb2f16a955d9fcd451a312aca8930658944b3fc60 (patch)
tree270a5534892471aa7e1ac5db3cc53dc17d71cc13 /cps-tbdmt-service/src
parent0792564e8e30aa1c3efc21e8f92fb6be7be167a1 (diff)
Update response for delete query
Issue-ID: CPS-757 Signed-off-by: Niranjana <niranjana.y60@wipro.com> Change-Id: I153ad1661a1bf11d34d0a354d1d38c5626cfc788
Diffstat (limited to 'cps-tbdmt-service/src')
-rw-r--r--cps-tbdmt-service/src/main/java/org/onap/cps/tbdmt/client/CpsRestClient.java2
-rw-r--r--cps-tbdmt-service/src/test/java/org/onap/cps/tbdmt/client/CpsRestClientTest.java5
2 files changed, 4 insertions, 3 deletions
diff --git a/cps-tbdmt-service/src/main/java/org/onap/cps/tbdmt/client/CpsRestClient.java b/cps-tbdmt-service/src/main/java/org/onap/cps/tbdmt/client/CpsRestClient.java
index c54355f..5d82069 100644
--- a/cps-tbdmt-service/src/main/java/org/onap/cps/tbdmt/client/CpsRestClient.java
+++ b/cps-tbdmt-service/src/main/java/org/onap/cps/tbdmt/client/CpsRestClient.java
@@ -190,7 +190,7 @@ public class CpsRestClient {
final int statusCode = responseEntity.getStatusCodeValue();
if (statusCode == 204) {
- return "Success";
+ return "{\"result\":\"Success\"}";
} else {
throw new CpsClientException(
String.format("Response code from CPS other than 204: %d", statusCode));
diff --git a/cps-tbdmt-service/src/test/java/org/onap/cps/tbdmt/client/CpsRestClientTest.java b/cps-tbdmt-service/src/test/java/org/onap/cps/tbdmt/client/CpsRestClientTest.java
index 76033c9..2cdb85a 100644
--- a/cps-tbdmt-service/src/test/java/org/onap/cps/tbdmt/client/CpsRestClientTest.java
+++ b/cps-tbdmt-service/src/test/java/org/onap/cps/tbdmt/client/CpsRestClientTest.java
@@ -186,7 +186,8 @@ public class CpsRestClientTest {
ArgumentMatchers.any(),
ArgumentMatchers.<Class<String>>any()))
.thenReturn(response);
- assertEquals("Success", cpsRestClient.deleteData("coverage-area-onap", "sample", "delete-list-node"));
+ assertEquals("{\"result\":\"Success\"}",
+ cpsRestClient.deleteData("coverage-area-onap", "sample", "delete-list-node"));
}
@Test
@@ -198,6 +199,6 @@ public class CpsRestClientTest {
ArgumentMatchers.any(),
ArgumentMatchers.<Class<String>>any()))
.thenReturn(response);
- assertEquals("Success", cpsRestClient.deleteData("coverage-area-onap", "sample", "delete"));
+ assertEquals("{\"result\":\"Success\"}", cpsRestClient.deleteData("coverage-area-onap", "sample", "delete"));
}
}