aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation/src/test/java/org/onap
diff options
context:
space:
mode:
authorAlexey Sandler <alexey.sandler@intl.att.com>2019-12-30 15:00:10 +0200
committerAlexey Sandler <alexey.sandler@intl.att.com>2019-12-30 16:17:48 +0200
commit804e47d279daaefb1639ea0f6860e3bd28fa80a5 (patch)
treea7ca2e571915eaa9323423041a77ec11328a13b6 /vid-automation/src/test/java/org/onap
parenta371bcd5601df09063af5a00b1579ce197690bfd (diff)
Create API test that verify original template should not be changed after deploy
Issue-ID: VID-724 Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com> Change-Id: I9e2b6ec52e95c4bcccef640b32118860338f3c46 Signed-off-by: Alexey Sandler <alexey.sandler@intl.att.com>
Diffstat (limited to 'vid-automation/src/test/java/org/onap')
-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 =