aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test
diff options
context:
space:
mode:
authorJozsef Csongvai <jozsef.csongvai@bell.ca>2020-12-09 19:49:48 -0500
committerJozsef Csongvai <jozsef.csongvai@bell.ca>2021-03-17 22:31:31 -0400
commitb96b44d6d7ca11dbbc3ad4bd2194df31fba5efb6 (patch)
treec10077ebb496410271ca3d07ca8896048c817bd9 /ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test
parentae588292c67e20c5cae8cb3c899957aac79a676d (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>
Diffstat (limited to 'ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test')
-rw-r--r--ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintErrorTest.kt12
1 files changed, 6 insertions, 6 deletions
diff --git a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintErrorTest.kt b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintErrorTest.kt
index 482d21abd..94ba98603 100644
--- a/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintErrorTest.kt
+++ b/ms/blueprintsprocessor/modules/blueprints/blueprint-core/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/core/BlueprintErrorTest.kt
@@ -10,24 +10,24 @@ class BlueprintErrorTest {
fun testBlueprintErrorIsCreatedWithemptyList() {
val bluePrintError = BlueprintError()
- assertTrue(bluePrintError.errors.isEmpty())
+ assertTrue(bluePrintError.allErrors().isEmpty())
}
@Test
fun testAddErrorWith3Params() {
val bluePrintError = BlueprintError()
- bluePrintError.addError("type", "name", "error")
+ bluePrintError.addError("type", "name", "error", "step")
- assertEquals("type : name : error", bluePrintError.errors[0])
+ assertEquals("type : name : error", bluePrintError.stepErrors("step")!![0])
}
@Test
- fun testAddErrorWith1Params() {
+ fun testAddErrorWith2Params() {
val bluePrintError = BlueprintError()
- bluePrintError.addError("error")
+ bluePrintError.addError("error", "step")
- assertEquals("error", bluePrintError.errors[0])
+ assertEquals("error", bluePrintError.stepErrors("step")!![0])
}
}