From 3935993a90fe768585ab5e908d6334567c1823de Mon Sep 17 00:00:00 2001 From: vasraz Date: Thu, 15 Sep 2022 14:27:20 +0100 Subject: Import unknown group types during Service import Signed-off-by: Vasyl Razinkov Change-Id: Ic435ee0c440dd8ed64339bab08e921687d23b9c0 Issue-ID: SDC-4176 --- .../sdc/be/components/impl/ServiceImportBusinessLogicTest.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'catalog-be/src/test/java') 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); -- cgit 1.2.3-korg