aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/InstantiationTemplatesApiTest.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/vid-automation/src/test/java/org/onap/vid/api/InstantiationTemplatesApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/InstantiationTemplatesApiTest.java
index 3c9786144..bc47ad834 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/InstantiationTemplatesApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/InstantiationTemplatesApiTest.java
@@ -98,6 +98,20 @@ public class InstantiationTemplatesApiTest extends AsyncInstantiationBase {
}
@Test
+ public void templateTopology_givenDeploy_OriginalTemplateNotChanged() throws IOException {
+ String uuidOriginTemplate = postAsyncInstanceRequest(fileAsJsonNode("asyncInstantiation/templates__instance_template.json"));
+ JsonNode originTemplateBeforeDeploy = restTemplate.getForObject(templateTopologyUri(uuidOriginTemplate), JsonNode.class);
+
+ ObjectNode changedNode = originTemplateBeforeDeploy.deepCopy();
+ changedNode.put("instanceName", "Cloned_Node_Instance_Name");
+ postAsyncInstanceRequest(changedNode);
+
+ JsonNode originTemplateAfterDeploy = restTemplate.getForObject(templateTopologyUri(uuidOriginTemplate), JsonNode.class);
+ assertThat(cleanupTemplate(originTemplateBeforeDeploy), jsonEquals(cleanupTemplate(originTemplateAfterDeploy)));
+
+ }
+
+ @Test
@FeatureTogglingTest(Features.FLAG_2004_CREATE_ANOTHER_INSTANCE_FROM_TEMPLATE)
public void templateTopology_givenDeploy_getServiceInfoHoldsRequestSummary() throws IOException {
ObjectNode request =