aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions/python-executor/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/functions/python-executor/src/test')
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutorTest.kt12
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSLTest.kt6
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorTest.kt42
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceTest.kt6
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHostTest.kt4
5 files changed, 35 insertions, 35 deletions
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutorTest.kt b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutorTest.kt
index 089a33931..d5fa0b20c 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutorTest.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentJythonExecutorTest.kt
@@ -26,9 +26,9 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
import org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor.mock.MockInstanceConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor.scripts.PythonExecutorConfiguration
import org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor.scripts.PythonExecutorProperty
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.cds.controllerblueprints.core.putJsonElement
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
@@ -63,15 +63,15 @@ class ComponentJythonExecutorTest {
ExecutionServiceInput::class.java
)!!
- val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
"1234",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/baseconfiguration"
)
val stepMetaData: MutableMap<String, JsonNode> = hashMapOf()
- stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "activate-jython")
- stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentJythonExecutor")
- stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_OPERATION, "process")
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "activate-jython")
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentJythonExecutor")
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_OPERATION, "process")
componentJythonExecutor.bluePrintRuntimeService = bluePrintRuntimeService
val stepInputData = StepData().apply {
name = "activate-jython"
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSLTest.kt b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSLTest.kt
index 0318664a0..46a3120d5 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSLTest.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorDSLTest.kt
@@ -17,21 +17,21 @@
package org.onap.ccsdk.cds.blueprintsprocessor.functions.python.executor
import org.junit.Test
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintTypes
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
import kotlin.test.assertNotNull
class ComponentRemotePythonExecutorDSLTest {
@Test
fun testNodeTypeComponentRemotePythonExecutor() {
- val nodeType = BlueprintTypes.nodeTypeComponentRemotePythonExecutor()
+ val nodeType = BluePrintTypes.nodeTypeComponentRemotePythonExecutor()
// println(nodeType.asJsonString(true))
assertNotNull(nodeType, "failed to generate nodeTypeComponentRemotePythonExecutor")
}
@Test
fun testNodeTemplateComponentRemotePythonExecutor() {
- val nodeTemplate = BlueprintTypes.nodeTemplateComponentRemotePythonExecutor(
+ val nodeTemplate = BluePrintTypes.nodeTemplateComponentRemotePythonExecutor(
"test-nodetemplate",
"test nodetemplate"
) {
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorTest.kt b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorTest.kt
index 2fd33f2a6..b81f05c6e 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorTest.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorTest.kt
@@ -22,7 +22,7 @@ import io.mockk.every
import io.mockk.mockk
import kotlinx.coroutines.runBlocking
import org.junit.Test
-import org.onap.ccsdk.cds.blueprintsprocessor.core.BlueprintPropertiesService
+import org.onap.ccsdk.cds.blueprintsprocessor.core.BluePrintPropertiesService
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.ExecutionServiceInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.PrepareRemoteEnvInput
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.RemoteScriptExecutionInput
@@ -33,13 +33,13 @@ import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StatusType
import org.onap.ccsdk.cds.blueprintsprocessor.core.api.data.StepData
import org.onap.ccsdk.cds.blueprintsprocessor.db.primary.repository.BlueprintModelRepository
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.RemoteScriptExecutionService
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintConstants
-import org.onap.ccsdk.cds.controllerblueprints.core.BlueprintError
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
+import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintError
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
import org.onap.ccsdk.cds.controllerblueprints.core.putJsonElement
-import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBlueprintRuntimeService
-import org.onap.ccsdk.cds.controllerblueprints.core.utils.BlueprintMetadataUtils
+import org.onap.ccsdk.cds.controllerblueprints.core.service.DefaultBluePrintRuntimeService
+import org.onap.ccsdk.cds.controllerblueprints.core.utils.BluePrintMetadataUtils
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import kotlin.test.assertEquals
import kotlin.test.assertNotNull
@@ -53,7 +53,7 @@ class ComponentRemotePythonExecutorTest {
val componentRemotePythonExecutor = ComponentRemotePythonExecutor(
remoteScriptExecutionService,
- mockk<BlueprintPropertiesService>(),
+ mockk<BluePrintPropertiesService>(),
mockk<BlueprintModelRepository>()
)
@@ -63,7 +63,7 @@ class ComponentRemotePythonExecutorTest {
ExecutionServiceInput::class.java
)!!
- val bluePrintRuntimeService = BlueprintMetadataUtils.getBlueprintRuntime(
+ val bluePrintRuntimeService = BluePrintMetadataUtils.getBluePrintRuntime(
"123456-1000",
"./../../../../components/model-catalog/blueprint-model/test-blueprint/remote_scripts"
)
@@ -75,9 +75,9 @@ class ComponentRemotePythonExecutorTest {
)
val stepMetaData: MutableMap<String, JsonNode> = hashMapOf()
- stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "execute-remote-python")
- stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentRemotePythonExecutor")
- stepMetaData.putJsonElement(BlueprintConstants.PROPERTY_CURRENT_OPERATION, "process")
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE, "execute-remote-python")
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_INTERFACE, "ComponentRemotePythonExecutor")
+ stepMetaData.putJsonElement(BluePrintConstants.PROPERTY_CURRENT_OPERATION, "process")
componentRemotePythonExecutor.bluePrintRuntimeService = bluePrintRuntimeService
val stepInputData = StepData().apply {
name = "execute-remote-python"
@@ -98,12 +98,12 @@ class ComponentRemotePythonExecutorTest {
val remoteScriptExecutionService = MockRemoteScriptExecutionService()
val componentRemotePythonExecutor = ComponentRemotePythonExecutor(
remoteScriptExecutionService,
- mockk<BlueprintPropertiesService>(),
+ mockk<BluePrintPropertiesService>(),
mockk<BlueprintModelRepository>()
)
- val bluePrintRuntime = mockk<DefaultBlueprintRuntimeService>("123456-1000")
+ val bluePrintRuntime = mockk<DefaultBluePrintRuntimeService>("123456-1000")
- every { bluePrintRuntime.getBlueprintError() } answers { BlueprintError() } // successful case.
+ every { bluePrintRuntime.getBluePrintError() } answers { BluePrintError() } // successful case.
every { bluePrintRuntime.setNodeTemplateAttributeValue(any(), any(), any()) } answers {}
val input = getMockedOutput(bluePrintRuntime)
@@ -115,20 +115,20 @@ class ComponentRemotePythonExecutorTest {
/**
* Mocked input information for remote python executor.
*/
- fun getMockedOutput(svc: DefaultBlueprintRuntimeService):
+ fun getMockedOutput(svc: DefaultBluePrintRuntimeService):
ExecutionServiceInput {
val stepMetaData: MutableMap<String, JsonNode> = hashMapOf()
stepMetaData.putJsonElement(
- BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE,
+ BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE,
"execute-remote-python"
)
stepMetaData.putJsonElement(
- BlueprintConstants.PROPERTY_CURRENT_INTERFACE,
+ BluePrintConstants.PROPERTY_CURRENT_INTERFACE,
"ComponentRemotePythonExecutor"
)
stepMetaData.putJsonElement(
- BlueprintConstants.PROPERTY_CURRENT_OPERATION, "process"
+ BluePrintConstants.PROPERTY_CURRENT_OPERATION, "process"
)
val mapper = ObjectMapper()
@@ -138,15 +138,15 @@ class ComponentRemotePythonExecutorTest {
val operationalInputs: MutableMap<String, JsonNode> = hashMapOf()
operationalInputs.putJsonElement(
- BlueprintConstants.PROPERTY_CURRENT_NODE_TEMPLATE,
+ BluePrintConstants.PROPERTY_CURRENT_NODE_TEMPLATE,
"execute-remote-python"
)
operationalInputs.putJsonElement(
- BlueprintConstants.PROPERTY_CURRENT_INTERFACE,
+ BluePrintConstants.PROPERTY_CURRENT_INTERFACE,
"ComponentRemotePythonExecutor"
)
operationalInputs.putJsonElement(
- BlueprintConstants.PROPERTY_CURRENT_OPERATION, "process"
+ BluePrintConstants.PROPERTY_CURRENT_OPERATION, "process"
)
operationalInputs.putJsonElement("endpoint-selector", "aai")
operationalInputs.putJsonElement("dynamic-properties", rootNode)
@@ -179,7 +179,7 @@ class ComponentRemotePythonExecutorTest {
"ComponentRemotePythonExecutor", "process"
)
} returns operationOutputs
- val bluePrintRuntimeService = BlueprintMetadataUtils.bluePrintRuntime(
+ val bluePrintRuntimeService = BluePrintMetadataUtils.bluePrintRuntime(
"123456-1000",
"./../../../../components/model-" +
"catalog/blueprint-model/test-blueprint/" +
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceTest.kt b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceTest.kt
index ad87f3c19..94ec1413f 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceTest.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintJythonServiceTest.kt
@@ -23,7 +23,7 @@ import io.mockk.mockk
import org.junit.runner.RunWith
import org.onap.ccsdk.cds.blueprintsprocessor.services.execution.AbstractComponentFunction
import org.onap.ccsdk.cds.controllerblueprints.core.normalizedPathName
-import org.onap.ccsdk.cds.controllerblueprints.core.service.BlueprintContext
+import org.onap.ccsdk.cds.controllerblueprints.core.service.BluePrintContext
import org.onap.ccsdk.cds.controllerblueprints.core.utils.JacksonUtils
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.test.context.ContextConfiguration
@@ -39,13 +39,13 @@ import kotlin.test.assertNotNull
"blueprints.processor.functions.python.executor.executionPath=./../../../../components/scripts/python/ccsdk_blueprints"])
class BlueprintJythonServiceTest {
- lateinit var blueprintContext: BlueprintContext
+ lateinit var blueprintContext: BluePrintContext
@Autowired
private lateinit var blueprintJythonService: BlueprintJythonServiceImpl
@BeforeTest
fun init() {
- blueprintContext = mockk<BlueprintContext>()
+ blueprintContext = mockk<BluePrintContext>()
every { blueprintContext.rootPath } returns normalizedPathName("target")
}
diff --git a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHostTest.kt b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHostTest.kt
index 2ebd10c38..0efaaa113 100644
--- a/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHostTest.kt
+++ b/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/scripts/BlueprintPythonHostTest.kt
@@ -26,7 +26,7 @@ import kotlin.test.BeforeTest
import kotlin.test.assertNotNull
@RunWith(SpringRunner::class)
-@ContextConfiguration(classes = [BlueprintPython::class, PythonExecutorProperty::class, String::class])
+@ContextConfiguration(classes = [BluePrintPython::class, PythonExecutorProperty::class, String::class])
@TestPropertySource(
properties =
[
@@ -48,7 +48,7 @@ class BlueprintPythonHostTest {
pythonPath.add(blueprintBasePath)
pythonPath.addAll(pythonExecutorProperty.modulePaths)
- blueprintPythonHost = BlueprintPythonHost(BlueprintPython(pythonExecutorProperty.executionPath, pythonPath, arrayListOf()))
+ blueprintPythonHost = BlueprintPythonHost(BluePrintPython(pythonExecutorProperty.executionPath, pythonPath, arrayListOf()))
}
@Test