aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/modules/commons/db-lib/src/test
diff options
context:
space:
mode:
authorOleg Mitsura <oleg.mitsura@amdocs.com>2022-05-19 11:05:13 -0400
committerOleg Mitsura <oleg.mitsura@amdocs.com>2022-05-19 11:20:21 -0400
commit0094e13ddec035faf7f80943783943003f12889a (patch)
tree76932d2d7517eed97686d93f647b778389e7a063 /ms/blueprintsprocessor/modules/commons/db-lib/src/test
parentc3943fbc70105c4ce38d66c7cbe227ddec35d535 (diff)
CCSDK-3671 add workflows list for grpc
Issue-ID: CCSDK-3671 1. added grpc 'getWorkflows' for BlueprintManagement 2. during CBA upload, the workflows get cached to BLUEPRINT_MODEL.workflows 3. reworked HTTP endpoint to use above "/workflows/blueprint-name/{name}/version/{version}" 4. If CDS is upgraded, with existing CBAs present, fallback by parsing the CBA instead of DB lookup Signed-off-by: Oleg Mitsura <oleg.mitsura@amdocs.com> Change-Id: I68bebfe23c0b16ea288512f1087bfe1ceef57686
Diffstat (limited to 'ms/blueprintsprocessor/modules/commons/db-lib/src/test')
-rw-r--r--ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt11
1 files changed, 7 insertions, 4 deletions
diff --git a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt
index b7b1f78cf..5f1d09578 100644
--- a/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt
+++ b/ms/blueprintsprocessor/modules/commons/db-lib/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/db/BlueprintProcessorCatalogServiceImplTest.kt
@@ -102,10 +102,11 @@ class BlueprintProcessorCatalogServiceImplTest {
runBlocking {
val file = normalizedFile("./target/blueprints/generated-cba.zip")
assertTrue(file.exists(), "couldnt get file ${file.absolutePath}")
- val metadata = bluePrintRuntimeService.bluePrintContext().metadata!!
+ val ctx = bluePrintRuntimeService.bluePrintContext()
+ val metadata = ctx.metadata!!
metadata[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = blueprintId
- blueprintsProcessorCatalogService.save(metadata, file)
+ blueprintsProcessorCatalogService.save(metadata, file, ctx.workflows()!!)
}
}
@@ -114,10 +115,12 @@ class BlueprintProcessorCatalogServiceImplTest {
runBlocking {
val file = normalizedFile("./target/blueprints/generated-cba.zip")
assertTrue(file.exists(), "couldnt get file ${file.absolutePath}")
- val metadata = bluePrintRuntimeService.bluePrintContext().metadata!!
+
+ val ctx = bluePrintRuntimeService.bluePrintContext()
+ val metadata = ctx.metadata!!
metadata[BluePrintConstants.PROPERTY_BLUEPRINT_PROCESS_ID] = blueprintId
- blueprintsProcessorCatalogService.save(metadata, file)
+ blueprintsProcessorCatalogService.save(metadata, file, ctx.workflows()!!)
blueprintsProcessorCatalogService.get("baseconfiguration", "1.0.0", true)
}