import org.onap.ccsdk.cds.controllerblueprints.core.TestConstants
import org.onap.ccsdk.cds.controllerblueprints.core.data.ToscaMetaData
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
-import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BlueprintCompileCache
+import org.onap.ccsdk.cds.controllerblueprints.core.scripts.BluePrintCompileCache
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
import kotlin.test.assertNull
import kotlin.test.assertTrue
-class BlueprintMetadataUtilsTest {
+class BluePrintMetadataUtilsTest {
@Test
fun testToscaMetaData() {
runBlocking {
val basePath = TestConstants.PATH_TEST_BLUEPRINTS_BASECONFIG
- val toscaMetaData: ToscaMetaData = BlueprintMetadataUtils.toscaMetaData(basePath)
+ val toscaMetaData: ToscaMetaData = BluePrintMetadataUtils.toscaMetaData(basePath)
assertNotNull(toscaMetaData, "Missing Tosca Definition Object")
assertNotNull(toscaMetaData.toscaMetaFileVersion, "Missing Tosca Metadata Version")
assertNotNull(toscaMetaData.csarVersion, "Missing CSAR version")
}
@Test
- fun testKotlinBlueprintContext() {
+ fun testKotlinBluePrintContext() {
runBlocking {
val path = normalizedPathName("src/test/resources/compile")
- val blueprintContext = BlueprintMetadataUtils.getBlueprintContext(path)
+ val blueprintContext = BluePrintMetadataUtils.getBluePrintContext(path)
assertNotNull(blueprintContext, "failed to get blueprint context")
assertNotNull(blueprintContext.serviceTemplate, "failed to get blueprint context service template")
assertNotNull(blueprintContext.serviceTemplate, "failed to get blueprint context service template")
assertNotNull(blueprintContext.otherDefinitions, "failed to get blueprint contextother definitions")
- var cachePresent = BlueprintCompileCache.hasClassLoader(path)
+ var cachePresent = BluePrintCompileCache.hasClassLoader(path)
assertTrue(cachePresent, "failed to generate cache key ($path)")
/** Cleaning Cache */
- BlueprintCompileCache.cleanClassLoader(path)
- cachePresent = BlueprintCompileCache.hasClassLoader(path)
+ BluePrintCompileCache.cleanClassLoader(path)
+ cachePresent = BluePrintCompileCache.hasClassLoader(path)
assertTrue(!cachePresent, "failed to remove cache key ($path)")
}
}
fun environmentDataTest() {
val environmentPath = "./src/test/resources/environments"
- val properties = BlueprintMetadataUtils.bluePrintEnvProperties(environmentPath)
+ val properties = BluePrintMetadataUtils.bluePrintEnvProperties(environmentPath)
assertNotNull(properties, "Could not read the properties")
assertEquals(properties.getProperty("blueprintsprocessor.database.alt1.username"), "username1", "failed 1")