aboutsummaryrefslogtreecommitdiffstats
path: root/ms/controllerblueprints/modules/service
diff options
context:
space:
mode:
Diffstat (limited to 'ms/controllerblueprints/modules/service')
-rw-r--r--ms/controllerblueprints/modules/service/src/test/kotlin/org/onap/ccsdk/apps/controllerblueprints/service/enhancer/BluePrintEnhancerServiceImplTest.kt15
1 files changed, 15 insertions, 0 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 48183f4cb..e0ecf0397 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
@@ -31,6 +31,7 @@ import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
import org.springframework.test.context.TestPropertySource
import org.springframework.test.context.junit4.SpringRunner
+import java.io.File
import java.nio.file.Paths
@RunWith(SpringRunner::class)
@@ -81,11 +82,20 @@ class BluePrintEnhancerServiceImplTest {
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")
+
+ }
private fun testComponentInvokeEnhancementAndValidation(basePath: String, targetDirName: String) {
val targetPath = Paths.get("target", targetDirName).toUri().path
+ deleteTargetDirectory(targetPath)
+
val bluePrintContext = bluePrintEnhancerService.enhance(basePath, targetPath)
Assert.assertNotNull("failed to get blueprintContext ", bluePrintContext)
@@ -94,4 +104,9 @@ class BluePrintEnhancerServiceImplTest {
Assert.assertTrue("blueprint($basePath) validation failed ", valid)
}
+ private fun deleteTargetDirectory(targetPath: String) {
+ val targetDirectory = File(targetPath)
+ targetDirectory.deleteRecursively()
+ }
+
} \ No newline at end of file