diff options
author | Brinda Santh <brindasanth@in.ibm.com> | 2019-07-24 20:38:36 -0400 |
---|---|---|
committer | Brinda Santh <brindasanth@in.ibm.com> | 2019-07-24 20:38:36 -0400 |
commit | ef03bd490adb4483fc0dd0f8726f33ba6187804a (patch) | |
tree | 4a2988703c31ee1f96362addab746e8f6e493b6b /ms/controllerblueprints/modules/service/src/test | |
parent | 06c38f1ae1e83103d615194fbaf3c55180bccb5d (diff) |
Fix missing capability cli models.
Change-Id: Id5ad2f75cf27b7c09dc95a028997847098cd3d2e
Issue-ID: CCSDK-1046
Signed-off-by: Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'ms/controllerblueprints/modules/service/src/test')
-rw-r--r-- | ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/cds/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt | 34 |
1 files changed, 18 insertions, 16 deletions
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) |