aboutsummaryrefslogtreecommitdiffstats
path: root/asdc-controller
diff options
context:
space:
mode:
Diffstat (limited to 'asdc-controller')
-rw-r--r--asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java1
-rw-r--r--asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInputTest.java4
2 files changed, 3 insertions, 2 deletions
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
index c26d4ad0b3..51b708d503 100644
--- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
+++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java
@@ -459,6 +459,7 @@ public class ToscaResourceInstaller {
ObjectMapper objectMapper = new ObjectMapper();
String jsonStr = objectMapper.writeValueAsString(resouceRequest);
+ jsonStr = jsonStr.replace("\"", "\\\"");
logger.debug("resource request for resource customization id (" + resourceCustomizationUuid + ") : " + jsonStr);
return jsonStr;
} catch (JsonProcessingException e) {
diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInputTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInputTest.java
index cecf70f916..e738235a0a 100644
--- a/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInputTest.java
+++ b/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInputTest.java
@@ -104,7 +104,7 @@ public class ToscaResourceInputTest {
when(property.getValue()).thenReturn("value1");
String resourceInput = toscaResourceInstaller.getResourceInput(toscaResourceStructure, "id1");
- assertEquals(resourceInput, "{\"prop1\":\"value1\"}");
+ assertEquals("{\\\"prop1\\\":\\\"value1\\\"}", resourceInput);
}
@Test
@@ -131,6 +131,6 @@ public class ToscaResourceInputTest {
when(input.getDefault()).thenReturn("default_value");
String resourceInput = toscaResourceInstaller.getResourceInput(toscaResourceStructure, "id1");
- assertEquals(resourceInput, "{\"prop1\":\"res_key|default_value\"}");
+ assertEquals("{\\\"prop1\\\":\\\"res_key|default_value\\\"}", resourceInput);
}
}