diff options
author | Jozsef Csongvai <jozsef.csongvai@bell.ca> | 2020-12-09 19:49:48 -0500 |
---|---|---|
committer | KAPIL SINGAL <ks220y@att.com> | 2021-03-24 01:58:57 +0000 |
commit | aa3f6d9d6d87d265319820eaecb77dabed010a7b (patch) | |
tree | d8b070a0fb63ac9b36f871ac530f0fcd8c07032a /ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/test | |
parent | 1f5c3b30a6bcee56dcdf848e578f2f72cddd3cd7 (diff) |
Refactoring to enable on_failure for imperative workflow
BlueprintError needs to associate errors with the steps in which they occurred
in order for imperative workflow to handle on_failure properly.
Made stepName more accessible and corrected places where stepName was assigned to nodeTemplateName.
Issue-ID: CCSDK-3219
Change-Id: I7e5805745c63558cff6be533e1b99c32ad06c3db
Signed-off-by: Jozsef Csongvai <jozsef.csongvai@bell.ca>
(cherry picked from commit b96b44d6d7ca11dbbc3ad4bd2194df31fba5efb6)
Diffstat (limited to 'ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/test')
-rw-r--r-- | ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintDesignTimeValidatorServiceTest.kt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintDesignTimeValidatorServiceTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintDesignTimeValidatorServiceTest.kt index 49c12b95f..dd82ec5da 100644 --- a/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintDesignTimeValidatorServiceTest.kt +++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-validation/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/validation/BlueprintDesignTimeValidatorServiceTest.kt @@ -63,10 +63,10 @@ class BlueprintDesignTimeValidatorServiceTest { workflow.steps = mutableMapOf("test" to step) workflowValidator.validate(bluePrintRuntime, workflowName, workflow) - assertEquals(1, bluePrintRuntime.getBlueprintError().errors.size) + assertEquals(1, bluePrintRuntime.getBlueprintError().allErrors().size) assertEquals( "Failed to validate Workflow(resource-assignment)'s step(test)'s definition : resource-assignment/steps/test : could't get node template for the name(TestCaseFailNoNodeTemplate)", - bluePrintRuntime.getBlueprintError().errors[0] + bluePrintRuntime.getBlueprintError().allErrors()[0] ) } @@ -96,12 +96,12 @@ class BlueprintDesignTimeValidatorServiceTest { workflow.steps = mutableMapOf("test" to step) workflowValidator.validate(bluePrintRuntime, workflowName, workflow) - assertEquals(1, bluePrintRuntime.getBlueprintError().errors.size) + assertEquals(1, bluePrintRuntime.getBlueprintError().allErrors().size) assertEquals( "Failed to validate Workflow(resource-assignment)'s step(test)'s definition : " + "resource-assignment/steps/test : NodeType(TestNodeType) derived from is 'tosca.nodes.TEST', " + "Expected 'tosca.nodes.Workflow' or 'tosca.nodes.Component'", - bluePrintRuntime.getBlueprintError().errors[0] + bluePrintRuntime.getBlueprintError().allErrors()[0] ) } |