summaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/service/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'ms/controllerblueprints/modules/service/src/test')
-rw-r--r--ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt28
1 files changed, 16 insertions, 12 deletions
diff --git a/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt b/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt
index 919d202f5..48183f4cb 100644
--- a/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt
+++ b/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt
@@ -64,30 +64,34 @@ class BluePrintEnhancerServiceImplTest {
fun testEnhancementAndValidation() {
val basePath = "./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
-
- val targetPath = Paths.get("target", "bp-enhance").toUri().path
-
- val bluePrintContext = bluePrintEnhancerService.enhance(basePath, targetPath)
- Assert.assertNotNull("failed to get blueprintContext ", bluePrintContext)
-
- // Validate the Generated BluePrints
- val valid = bluePrintValidatorService.validateBluePrints(targetPath)
- Assert.assertTrue("blueprint validation failed ", valid)
+ testComponentInvokeEnhancementAndValidation(basePath, "base-enhance")
}
@Test
@Throws(Exception::class)
- fun testEnhancementAndValidation2() {
+ fun testComponentInvokeEnhancementAndValidation() {
+ val basePath = "./../../../../components/model-catalog/blueprint-model/test-blueprint/component_invoke"
+ testComponentInvokeEnhancementAndValidation(basePath, "component-enhance")
+ }
+ @Test
+ @Throws(Exception::class)
+ fun testGoldenEnhancementAndValidation() {
val basePath = "./../../../../components/model-catalog/blueprint-model/test-blueprint/golden"
+ testComponentInvokeEnhancementAndValidation(basePath, "golden-enhance")
+ }
- val targetPath = Paths.get("target", "bp-enhance").toUri().path
+
+ private fun testComponentInvokeEnhancementAndValidation(basePath: String, targetDirName: String) {
+
+ val targetPath = Paths.get("target", targetDirName).toUri().path
val bluePrintContext = bluePrintEnhancerService.enhance(basePath, targetPath)
Assert.assertNotNull("failed to get blueprintContext ", bluePrintContext)
// Validate the Generated BluePrints
val valid = bluePrintValidatorService.validateBluePrints(targetPath)
- Assert.assertTrue("blueprint validation failed ", valid)
+ Assert.assertTrue("blueprint($basePath) validation failed ", valid)
}
+
} \ No newline at end of file