From d77bdf472a4fb5b6cf8e17f2d0d8e8d2bababeaf Mon Sep 17 00:00:00 2001 From: MichaelMorris Date: Fri, 21 Jan 2022 21:18:01 +0000 Subject: Fix issues creating control loop model Change-Id: I38812f812fdf082aaadf13b79b8b05d26a481b15 Issue-ID: SDC-3856 Signed-off-by: MichaelMorris --- .../components/impl/ComponentInstanceBusinessLogicTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'catalog-be/src/test/java') diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogicTest.java index 99034f7785..8499dad5dc 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogicTest.java @@ -1726,14 +1726,14 @@ class ComponentInstanceBusinessLogicTest { when(toscaOperationFacade.getToscaFullElement(eq(ORIGIN_COMPONENT_ID))) .thenReturn(Either.left(originComponent)); // Assume services cannot contain VF resource - when(containerInstanceTypeData.isAllowedForServiceComponent(eq(ResourceTypeEnum.VF))) + when(containerInstanceTypeData.isAllowedForServiceComponent(eq(ResourceTypeEnum.VF), eq(null))) .thenReturn(false); ByActionStatusComponentException actualException = assertThrows(ByActionStatusComponentException.class, () -> { componentInstanceBusinessLogic.createComponentInstance(ComponentTypeEnum.SERVICE_PARAM_NAME, COMPONENT_ID, USER_ID, ci); }); assertThat(actualException.getActionStatus()).isEqualTo(ActionStatus.CONTAINER_CANNOT_CONTAIN_INSTANCE); - verify(containerInstanceTypeData, times(1)).isAllowedForServiceComponent(eq(ResourceTypeEnum.VF)); + verify(containerInstanceTypeData, times(1)).isAllowedForServiceComponent(eq(ResourceTypeEnum.VF), eq(null)); //given final Resource resource = createResource(); @@ -1765,7 +1765,7 @@ class ComponentInstanceBusinessLogicTest { .thenReturn(Either.left(service)); when(toscaOperationFacade.getToscaFullElement(eq(ORIGIN_COMPONENT_ID))) .thenReturn(Either.left(originComponent)); - when(containerInstanceTypeData.isAllowedForServiceComponent(eq(ResourceTypeEnum.VF))) + when(containerInstanceTypeData.isAllowedForServiceComponent(eq(ResourceTypeEnum.VF), eq(null))) .thenReturn(true); Mockito.doNothing().when(compositionBusinessLogic).validateAndSetDefaultCoordinates(ci); when(graphLockOperation.lockComponent(COMPONENT_ID, NodeTypeEnum.Service)) @@ -1784,7 +1784,7 @@ class ComponentInstanceBusinessLogicTest { componentInstanceBusinessLogic.createComponentInstance(ComponentTypeEnum.SERVICE_PARAM_NAME, COMPONENT_ID, USER_ID, ci); }); verify(containerInstanceTypeData, times(1)) - .isAllowedForServiceComponent(eq(ResourceTypeEnum.VF)); + .isAllowedForServiceComponent(eq(ResourceTypeEnum.VF), eq(null)); verify(compositionBusinessLogic, times(1)).validateAndSetDefaultCoordinates(ci); verify(toscaOperationFacade, times(1)) .addComponentInstanceToTopologyTemplate(service, originComponent, ci, false, user); @@ -1807,7 +1807,7 @@ class ComponentInstanceBusinessLogicTest { .thenReturn(Either.left(service)); when(toscaOperationFacade.getToscaFullElement(eq(ORIGIN_COMPONENT_ID))) .thenReturn(Either.left(originComponent)); - when(containerInstanceTypeData.isAllowedForServiceComponent(eq(ResourceTypeEnum.VF))) + when(containerInstanceTypeData.isAllowedForServiceComponent(eq(ResourceTypeEnum.VF), eq(null))) .thenReturn(true); Mockito.doNothing().when(compositionBusinessLogic).validateAndSetDefaultCoordinates(instanceToBeCreated); when(graphLockOperation.lockComponent(COMPONENT_ID, NodeTypeEnum.Service)) @@ -1830,7 +1830,7 @@ class ComponentInstanceBusinessLogicTest { assertThat(instanceToBeCreated.getComponentVersion()).isEqualTo(originComponent.getVersion()); assertThat(instanceToBeCreated.getIcon()).isEqualTo(originComponent.getIcon()); verify(containerInstanceTypeData, times(1)) - .isAllowedForServiceComponent(eq(ResourceTypeEnum.VF)); + .isAllowedForServiceComponent(eq(ResourceTypeEnum.VF), eq(null)); verify(compositionBusinessLogic, times(1)).validateAndSetDefaultCoordinates(instanceToBeCreated); verify(toscaOperationFacade, times(1)) .addComponentInstanceToTopologyTemplate(service, originComponent, instanceToBeCreated, false, user); -- cgit 1.2.3-korg