diff options
author | JvD_Ericsson <jeff.van.dam@est.tech> | 2022-08-19 16:11:47 +0100 |
---|---|---|
committer | Michael Morris <michael.morris@est.tech> | 2022-10-14 11:58:46 +0000 |
commit | 680d8a6f9bd8f2be953f835c9fff6ac3ebfeb1c3 (patch) | |
tree | 1a96e01316e2da08115c1d05a47e6d83d606ea3c /catalog-be/src/test | |
parent | c53d40dd69c956dabfd30eb7dcecad03151747fe (diff) |
Support import of updated node types with added attributes
Support addition of new attributes,
new capabilities, new requirements,
and new interfaces
Issue-ID: SDC-4142
Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech>
Change-Id: I987fdf6b0e7dae275fcc6ac43f3dd7aa21628f4a
Diffstat (limited to 'catalog-be/src/test')
3 files changed, 13 insertions, 8 deletions
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogicTest.java index f6656693d9..83bcf81178 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogicTest.java @@ -318,6 +318,10 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest Map<String, Object> nodeTypesMap = nodeTypes.getValue(); Map<String, Object> newUpdatedNodeType = (Map<String, Object>) nodeTypesMap.get(updatedNodeType); assertEquals(8, ((Map<String, Object>) newUpdatedNodeType.get("properties")).size()); + Assertions.assertNull(newUpdatedNodeType.get("attributes")); + assertEquals(3, ((List<Map<String, Object>>) newUpdatedNodeType.get("requirements")).size()); + assertEquals(1, ((Map<String, Object>) newUpdatedNodeType.get("capabilities")).size()); + assertEquals(2, ((Map<String, Object>) newUpdatedNodeType.get("interfaces")).size()); ArgumentCaptor<String> interfaceTypes = ArgumentCaptor.forClass(String.class); verify(interfaceLifecycleTypeImportManager).createLifecycleTypes(interfaceTypes.capture(), any(), anyBoolean()); diff --git a/catalog-be/src/test/resources/csars/service-Ser09080002-csar.csar b/catalog-be/src/test/resources/csars/service-Ser09080002-csar.csar Binary files differindex de7d71fc37..5c990c98bd 100644 --- a/catalog-be/src/test/resources/csars/service-Ser09080002-csar.csar +++ b/catalog-be/src/test/resources/csars/service-Ser09080002-csar.csar diff --git a/catalog-be/src/test/resources/node-types/resource-Extcp-template.yml b/catalog-be/src/test/resources/node-types/resource-Extcp-template.yml index 4302a129d7..1dac9a0e83 100644 --- a/catalog-be/src/test/resources/node-types/resource-Extcp-template.yml +++ b/catalog-be/src/test/resources/node-types/resource-Extcp-template.yml @@ -85,11 +85,12 @@ node_types: - 0 - UNBOUNDED capability: tosca.capabilities.network.Linkable - relationship: tosca.relationships.network.LinksTo - - external_virtualLink: - occurrences: - - 0 - - UNBOUNDED - capability: tosca.capabilities.network.Linkable - node: org.openecomp.resource.vl.VL - relationship: tosca.relationships.network.LinksTo + interfaces: + Vnflcm: + type: tosca.interfaces.nfv.Vnflcm + heal: + description: ASDASDAS + implementation: Artifacts/Deployment/WORKFLOW/BPMN/ASDWASDW + inputs: + sd: original + ADWA: original
\ No newline at end of file |