aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2019-12-30 14:38:15 +0000
committerGerrit Code Review <gerrit@onap.org>2019-12-30 14:38:15 +0000
commit88898c121c8e405d8c6445d54f3fdc23675c0305 (patch)
treeec555e9468afff1d35bfd9f83b7eed9ac98803f6 /vid-automation
parent18c3ce8d1e1d166d5302f9708036202b0258110e (diff)
parent804e47d279daaefb1639ea0f6860e3bd28fa80a5 (diff)
Merge "Create API test that verify original template should not be changed after deploy"
Diffstat (limited to 'vid-automation')
-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 =