diff options
Diffstat (limited to 'catalog-be/src/test')
5 files changed, 72 insertions, 77 deletions
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandlerTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandlerTest.java index 800fbc2082..b57ae5a00c 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandlerTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/InterfaceDefinitionHandlerTest.java @@ -129,7 +129,7 @@ class InterfaceDefinitionHandlerTest { assertThrows(ByActionStatusComponentException.class, () -> interfaceDefinitionHandler.create(load, StringUtils.EMPTY)); assertEquals(ActionStatus.INVALID_OPERATION_MILESTONE, actualException.getActionStatus()); assertEquals(1, actualException.getParams().length); - assertEquals("on_failure", actualException.getParams()[0]); + assertEquals("on_success", actualException.getParams()[0]); } private void assertInterfaceDefinition(final InterfaceDefinition actualInterfaceDefinition) { diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/InterfacesOperationsConverterTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/InterfacesOperationsConverterTest.java index 7e4b4c28e2..5afd520811 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/InterfacesOperationsConverterTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/tosca/InterfacesOperationsConverterTest.java @@ -661,10 +661,8 @@ class InterfacesOperationsConverterTest { Map<String, Object> resource = (Map<String, Object>) resourceName; assertTrue(resource.containsKey("name_for_op_0")); Map<String, Object> operation0 = (Map<String, Object>) resource.get("name_for_op_0"); - assertTrue(operation0.containsKey("milestones")); - Map<String, Object> operation0Milestones = (Map<String, Object>) operation0.get("milestones"); - assertTrue(operation0Milestones.containsKey(MilestoneTypeEnum.ON_ENTRY.getValue())); - Map<String, Object> milestone = (Map<String, Object>) operation0Milestones.get(MilestoneTypeEnum.ON_ENTRY.getValue()); + assertTrue(operation0.containsKey(MilestoneTypeEnum.ON_ENTRY.getValue())); + Map<String, Object> milestone = (Map<String, Object>) operation0.get(MilestoneTypeEnum.ON_ENTRY.getValue()); assertTrue(milestone.containsKey("activities")); List<Map<String, Object>> activities = (List<Map<String, Object>>) milestone.get("activities"); assertEquals(1, activities.size()); @@ -676,7 +674,7 @@ class InterfacesOperationsConverterTest { assertEquals("workflow1", activityVariables.get("workflow")); assertTrue(activityVariables.containsKey("inputs")); assertTrue(activityVariables.get("inputs") instanceof Map); - Map<String, Object> inputs = (Map<String, Object>) activityVariables.get("inputs"); + Map<String, Object> inputs = (Map<String, Object>) activityVariables.get("inputs"); assertNotNull(inputs); assertTrue(inputs.containsKey("stringName")); assertTrue(inputs.get("stringName") instanceof String); diff --git a/catalog-be/src/test/resources/interfaceDefinition/interfaceDefinition-legacy.yaml b/catalog-be/src/test/resources/interfaceDefinition/interfaceDefinition-legacy.yaml index 108c43f547..2d13fb8f5e 100644 --- a/catalog-be/src/test/resources/interfaceDefinition/interfaceDefinition-legacy.yaml +++ b/catalog-be/src/test/resources/interfaceDefinition/interfaceDefinition-legacy.yaml @@ -46,54 +46,53 @@ start: service_restoration_sla: service_restoration_sla_value battery_backup: true partner_priorty_assist: false - milestones: - on_failure: - activities: - - delegate: - workflow: workflow1 - - delegate: - workflow: workflow2 - on_success: - activities: - - delegate: - workflow: workflow1 - - delegate: - workflow: workflow2 - inputs: - string: - testString - complex: - jeopardyType: test - name: name - eventType: type - message: message - filters: - - my_attribute: - equal: - get_attribute: - - SELF - - role - - my_attribute1: - greaterThan: my_other_value - - my_attribute2: - inRange: - - test1 - - test99 - - my_attribute3: - validValues: - - test1 - - test2 - - test3 - - my_attribute4: - length: 12 - - my_attribute5: - minLength: 4 - on_timeout: - activities: - - delegate: - workflow: workflow1 - - delegate: - workflow: workflow2 + on_failure: + activities: + - delegate: + workflow: workflow1 + - delegate: + workflow: workflow2 + on_success: + activities: + - delegate: + workflow: workflow1 + - delegate: + workflow: workflow2 + inputs: + string: + testString + complex: + jeopardyType: test + name: name + eventType: type + message: message + filters: + - my_attribute: + equal: + get_attribute: + - SELF + - role + - my_attribute1: + greaterThan: my_other_value + - my_attribute2: + inRange: + - test1 + - test99 + - my_attribute3: + validValues: + - test1 + - test2 + - test3 + - my_attribute4: + length: 12 + - my_attribute5: + minLength: 4 + on_timeout: + activities: + - delegate: + workflow: workflow1 + - delegate: + workflow: workflow2 stop: implementation: "camunda/executeAction" inputs: diff --git a/catalog-be/src/test/resources/interfaceDefinition/interfaceDefinition-tosca1.3.yaml b/catalog-be/src/test/resources/interfaceDefinition/interfaceDefinition-tosca1.3.yaml index 0eb1db33a9..2b3e28c721 100644 --- a/catalog-be/src/test/resources/interfaceDefinition/interfaceDefinition-tosca1.3.yaml +++ b/catalog-be/src/test/resources/interfaceDefinition/interfaceDefinition-tosca1.3.yaml @@ -41,25 +41,24 @@ operations: service_restoration_sla: service_restoration_sla_value battery_backup: true partner_priorty_assist: false - milestones: - on_failure: - activities: - - delegate: - workflow: workflow1 - - delegate: - workflow: workflow2 - on_success: - activities: - - delegate: - workflow: workflow1 - - delegate: - workflow: workflow2 - on_timeout: - activities: - - delegate: - workflow: workflow1 - - delegate: - workflow: workflow2 + on_failure: + activities: + - delegate: + workflow: workflow1 + - delegate: + workflow: workflow2 + on_success: + activities: + - delegate: + workflow: workflow1 + - delegate: + workflow: workflow2 + on_timeout: + activities: + - delegate: + workflow: workflow1 + - delegate: + workflow: workflow2 stop: implementation: "camunda/executeAction" inputs: diff --git a/catalog-be/src/test/resources/interfaceDefinition/interfaceDefinitionInvalidMilestone-tosca1.3.yaml b/catalog-be/src/test/resources/interfaceDefinition/interfaceDefinitionInvalidMilestone-tosca1.3.yaml index 4e3c556cb8..c6a297b4ae 100644 --- a/catalog-be/src/test/resources/interfaceDefinition/interfaceDefinitionInvalidMilestone-tosca1.3.yaml +++ b/catalog-be/src/test/resources/interfaceDefinition/interfaceDefinitionInvalidMilestone-tosca1.3.yaml @@ -11,7 +11,6 @@ type: tosca.interfaces.node.lifecycle.Standard operations: start: implementation: "camunda/executeAction" - milestones: - on_failure: - on_success: - on_timeout:
\ No newline at end of file + on_failure: + on_success: + on_timeout:
\ No newline at end of file |