diff options
author | Seshu Kumar M <seshu.kumar.m@huawei.com> | 2021-06-17 05:55:57 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-06-17 05:55:57 +0000 |
commit | 668d33065ca0be29c7d2edf78809d20ab17bfed1 (patch) | |
tree | 6fd070a1872bf60d1f8c8ef77ac75ae38975b7d6 /asdc-controller/src/test | |
parent | bcd074c7b4289d9fc3ed9813c5480e4e9647bba3 (diff) | |
parent | 1bd6e1e2f978abbab4b924288a72ff6b2657d1e4 (diff) |
Merge "Fixed sdc-controller ingestion logic for cds values"
Diffstat (limited to 'asdc-controller/src/test')
-rw-r--r-- | asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInstallerTest.java | 31 | ||||
-rw-r--r-- | asdc-controller/src/test/resources/download/service-pnfservice.csar | bin | 27525 -> 27126 bytes | |||
-rw-r--r-- | asdc-controller/src/test/resources/download/service-vnfservice.csar | bin | 27602 -> 27206 bytes |
3 files changed, 31 insertions, 0 deletions
diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInstallerTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInstallerTest.java index e4882119ab..bf327f5bb1 100644 --- a/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInstallerTest.java +++ b/asdc-controller/src/test/java/org/onap/so/asdc/installer/heat/ToscaResourceInstallerTest.java @@ -36,6 +36,7 @@ import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Optional; @@ -571,6 +572,36 @@ public class ToscaResourceInstallerTest extends BaseTest { doReturn(namingPolicy).when(metadata).getValue("namingPolicy"); doReturn(ecompGeneratedNaming).when(metadata).getValue("ecompGeneratedNaming"); + ISdcCsarHelper iSdcCsarHelper = mock(ISdcCsarHelper.class); + List<Input> serviceInputs = new ArrayList<Input>(); + + LinkedHashMap<String, Object> value = new LinkedHashMap<String, Object>(); + value.put("controller_actor", "SO-REF-DATA"); + value.put("type", "string"); + Input input = new Input("controller_actor", value, null); + serviceInputs.add(0, input); + + value = new LinkedHashMap<String, Object>(); + value.put("cds_model_version", "v1.4.0"); + value.put("type", "string"); + input = new Input("cds_model_version", value, null); + serviceInputs.add(1, input); + + value = new LinkedHashMap<String, Object>(); + value.put("cds_model_name", "Blueprint140"); + value.put("type", "string"); + input = new Input("cds_model_name", value, null); + serviceInputs.add(2, input); + + value = new LinkedHashMap<String, Object>(); + value.put("skip_post_instantiation_configuration", "false"); + value.put("type", "boolean"); + input = new Input("skip_post_instantiation_configuration", value, null); + serviceInputs.add(3, input); + + doReturn(iSdcCsarHelper).when(toscaResourceStructure).getSdcCsarHelper(); + doReturn(serviceInputs).when(iSdcCsarHelper).getServiceInputs(); + Service service = toscaInstaller.createService(toscaResourceStructure, resourceStructure); assertNotNull(service); diff --git a/asdc-controller/src/test/resources/download/service-pnfservice.csar b/asdc-controller/src/test/resources/download/service-pnfservice.csar Binary files differindex 89d24a18ee..a026c7aebe 100644 --- a/asdc-controller/src/test/resources/download/service-pnfservice.csar +++ b/asdc-controller/src/test/resources/download/service-pnfservice.csar diff --git a/asdc-controller/src/test/resources/download/service-vnfservice.csar b/asdc-controller/src/test/resources/download/service-vnfservice.csar Binary files differindex 25d2ebd6c6..1dcfb59442 100644 --- a/asdc-controller/src/test/resources/download/service-vnfservice.csar +++ b/asdc-controller/src/test/resources/download/service-vnfservice.csar |