diff options
author | vasraz <vasyl.razinkov@est.tech> | 2022-09-15 14:27:20 +0100 |
---|---|---|
committer | Michael Morris <michael.morris@est.tech> | 2022-09-19 08:39:08 +0000 |
commit | 3935993a90fe768585ab5e908d6334567c1823de (patch) | |
tree | 6539da2e6809e0faa6859e5b9deb2ce6cdd93181 /catalog-be/src/test/java | |
parent | 0d38a72c022fa93dba0bf052f893e51fb73d3552 (diff) |
Import unknown group types during Service import
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Change-Id: Ic435ee0c440dd8ed64339bab08e921687d23b9c0
Issue-ID: SDC-4176
Diffstat (limited to 'catalog-be/src/test/java')
-rw-r--r-- | catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceImportBusinessLogicTest.java | 4 |
1 files changed, 4 insertions, 0 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 6b92c4a3ea..e4b6dd4021 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 @@ -91,6 +91,7 @@ import org.openecomp.sdc.be.model.ComponentMetadataDefinition; import org.openecomp.sdc.be.model.ComponentParametersView; import org.openecomp.sdc.be.model.DataTypeDefinition; import org.openecomp.sdc.be.model.GroupDefinition; +import org.openecomp.sdc.be.model.GroupTypeDefinition; import org.openecomp.sdc.be.model.IPropertyInputCommon; import org.openecomp.sdc.be.model.InputDefinition; import org.openecomp.sdc.be.model.InterfaceDefinition; @@ -113,6 +114,7 @@ import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.cache.ApplicationDataTypeCache; import org.openecomp.sdc.be.model.operations.api.ICapabilityTypeOperation; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; +import org.openecomp.sdc.be.model.operations.impl.GroupTypeOperation; import org.openecomp.sdc.be.model.operations.impl.ArtifactTypeOperation; import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum; import org.openecomp.sdc.be.servlets.AbstractValidationsServlet; @@ -139,6 +141,7 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest private final ArtifactTypeOperation artifactTypeOperation = mock(ArtifactTypeOperation.class); private final DataTypeBusinessLogic dataTypeBusinessLogic = mock(DataTypeBusinessLogic.class); private final ArtifactTypeImportManager artifactTypeImportManager = mock(ArtifactTypeImportManager.class); + private final GroupTypeOperation groupTypeOperation = mock(GroupTypeOperation.class); @InjectMocks private ServiceImportBusinessLogic sIBL; @@ -260,6 +263,7 @@ class ServiceImportBusinessLogicTest extends ServiceImportBussinessLogicBaseTest .thenReturn(resourceTemplate); when(toscaOperationFacade.updatePropertyOfComponent(eq(oldService), any(PropertyDefinition.class))).thenReturn(Either.left(null)); when(toscaOperationFacade.updateComponentInstancePropsToComponent(anyMap(), anyString())).thenReturn(Either.left(null)); + when(groupTypeOperation.getGroupTypeByUid(anyString())).thenReturn(Either.left(new GroupTypeDefinition())); Service result = sIBL.createService(oldService, AuditingActionEnum.CREATE_RESOURCE, user, payload, payloadName); assertNotNull(result); |