From ef03bd490adb4483fc0dd0f8726f33ba6187804a Mon Sep 17 00:00:00 2001 From: Brinda Santh Date: Wed, 24 Jul 2019 20:38:36 -0400 Subject: Fix missing capability cli models. Change-Id: Id5ad2f75cf27b7c09dc95a028997847098cd3d2e Issue-ID: CCSDK-1046 Signed-off-by: Brinda Santh --- .../enhancer/BluePrintEnhancerServiceImplTest.kt | 34 ++++++++++++---------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'ms/controllerblueprints/modules/service') diff --git a/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt b/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt index b4c29dec3..1f872c2da 100644 --- a/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt +++ b/ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt @@ -19,15 +19,12 @@ package org.onap.ccsdk.cds.controllerblueprints.service.enhancer import kotlinx.coroutines.runBlocking import org.junit.Assert -import org.junit.Before import org.junit.Test import org.junit.runner.RunWith import org.onap.ccsdk.cds.controllerblueprints.TestApplication -import org.onap.ccsdk.cds.controllerblueprints.core.compress import org.onap.ccsdk.cds.controllerblueprints.core.deleteDir import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintEnhancerService import org.onap.ccsdk.cds.controllerblueprints.core.interfaces.BluePrintValidatorService -import org.onap.ccsdk.cds.controllerblueprints.core.normalizedFile import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName import org.onap.ccsdk.cds.controllerblueprints.service.load.ModelTypeLoadService import org.onap.ccsdk.cds.controllerblueprints.service.load.ResourceDictionaryLoadService @@ -53,8 +50,11 @@ class BluePrintEnhancerServiceImplTest { @Autowired lateinit var bluePrintValidatorService: BluePrintValidatorService - @Before - fun init() { + + @Test + @Throws(Exception::class) + fun testEnhancementAndValidation() { + runBlocking { modelTypeLoadService.loadPathModelType("./../../../../components/model-catalog/definition-type/starter-type") @@ -62,46 +62,48 @@ class BluePrintEnhancerServiceImplTest { dictPaths.add("./../../../../components/model-catalog/resource-dictionary/starter-dictionary") dictPaths.add("./../../../../components/model-catalog/resource-dictionary/test-dictionary") resourceDictionaryLoadService.loadPathsResourceDictionary(dictPaths) + + testBaseConfigEnhancementAndValidation() + testVFWEnhancementAndValidation() + testGoldenEnhancementAndValidation() + testCapabilityRestconfEnhancementAndValidation() + testRemoteScriptsEnhancementAndValidation() + testCapabilityCliEnhancementAndValidation() } } - @Test - @Throws(Exception::class) - fun testEnhancementAndValidation() { + fun testBaseConfigEnhancementAndValidation() { val basePath = "./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration" testComponentInvokeEnhancementAndValidation(basePath, "base-enhance") } - @Test - @Throws(Exception::class) fun testVFWEnhancementAndValidation() { val basePath = "./../../../../components/model-catalog/blueprint-model/service-blueprint/vFW" testComponentInvokeEnhancementAndValidation(basePath, "vFW-enhance") } - @Test - @Throws(Exception::class) fun testGoldenEnhancementAndValidation() { val basePath = "./../../../../components/model-catalog/blueprint-model/test-blueprint/golden" testComponentInvokeEnhancementAndValidation(basePath, "golden-enhance") } - @Test - @Throws(Exception::class) fun testCapabilityRestconfEnhancementAndValidation() { val basePath = "./../../../../components/model-catalog/blueprint-model/test-blueprint/capability_restconf" testComponentInvokeEnhancementAndValidation(basePath, "capability_restconf-enhance") } - @Test - @Throws(Exception::class) fun testRemoteScriptsEnhancementAndValidation() { val basePath = "./../../../../components/model-catalog/blueprint-model/test-blueprint/remote_scripts" testComponentInvokeEnhancementAndValidation(basePath, "remote_scripts-enhance") } + fun testCapabilityCliEnhancementAndValidation() { + val basePath = "./../../../../components/model-catalog/blueprint-model/test-blueprint/capability_cli" + testComponentInvokeEnhancementAndValidation(basePath, "capability_cli-enhance") + } + private fun testComponentInvokeEnhancementAndValidation(basePath: String, targetDirName: String) { runBlocking { val targetPath = normalizedPathName("target/blueprints/enrichment", targetDirName) -- cgit 1.2.3-korg