aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorTest.kt
diff options
context:
space:
mode:
Diffstat (limited to 'ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorTest.kt')
-rw-r--r--ms/blueprintsprocessor/functions/python-executor/src/test/kotlin/org/onap/ccsdk/cds/blueprintsprocessor/functions/python/executor/ComponentRemotePythonExecutorTest.kt42
1 files changed, 21 insertions, 21 deletions
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/" +