aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions/resource-resolution/src/test
diff options
context:
space:
mode:
authorMuthuramalingam, Brinda Santh <brindasanth@in.ibm.com>2019-03-11 16:34:55 -0400
committerMuthuramalingam, Brinda Santh <brindasanth@in.ibm.com>2019-03-13 15:09:10 -0400
commit5eea68f0a351af133e873ef98f3c3fa258150270 (patch)
tree0607371d2ee7f9821893c9827c3634867d199d8a /ms/blueprintsprocessor/functions/resource-resolution/src/test
parent758458d3f0ecb9c9abeca5b5f8dde39171c0e9f2 (diff)
Improve RA capability processor.
Change-Id: I44a8157c9e2a27b49aa8af00a857ebc7b3e845c3 Issue-ID: CCSDK-1137 Signed-off-by: Muthuramalingam, Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'ms/blueprintsprocessor/functions/resource-resolution/src/test')
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessorTest.kt10
-rw-r--r--ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/capability/jython-resource-definitions.json2
2 files changed, 8 insertions, 4 deletions
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessorTest.kt b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessorTest.kt
index f779054e..6da3fd71 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessorTest.kt
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/resource/resolution/processor/CapabilityResourceResolutionProcessorTest.kt
@@ -21,6 +21,7 @@ package org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.pr
import org.junit.Test
import org.junit.runner.RunWith
import org.onap.ccsdk.apps.blueprintsprocessor.functions.resource.resolution.ResourceAssignmentRuntimeService
+import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.ComponentFunctionScriptingService
import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.scripts.BlueprintJythonService
import org.onap.ccsdk.apps.blueprintsprocessor.services.execution.scripts.PythonExecutorProperty
import org.onap.ccsdk.apps.controllerblueprints.core.data.PropertyDefinition
@@ -36,7 +37,8 @@ import org.springframework.test.context.junit4.SpringRunner
import kotlin.test.assertNotNull
@RunWith(SpringRunner::class)
-@ContextConfiguration(classes = [CapabilityResourceResolutionProcessor::class, BluePrintScriptsServiceImpl::class,
+@ContextConfiguration(classes = [CapabilityResourceResolutionProcessor::class, ComponentFunctionScriptingService::class,
+ BluePrintScriptsServiceImpl::class,
BlueprintJythonService::class, PythonExecutorProperty::class, MockCapabilityService::class])
@TestPropertySource(properties =
["blueprints.processor.functions.python.executor.modulePaths=./../../../../components/scripts/python/ccsdk_blueprints",
@@ -62,9 +64,11 @@ class CapabilityResourceResolutionProcessorTest {
scriptPropertyInstances["mock-service1"] = MockCapabilityService()
scriptPropertyInstances["mock-service2"] = MockCapabilityService()
+ val instanceDependencies: List<String> = listOf()
+
val resourceAssignmentProcessor = capabilityResourceResolutionProcessor
- .getKotlinResourceAssignmentProcessorInstance(
- "ResourceAssignmentProcessor_cba\$ScriptResourceAssignmentProcessor", scriptPropertyInstances)
+ .scriptInstance("kotlin",
+ "ResourceAssignmentProcessor_cba\$ScriptResourceAssignmentProcessor", instanceDependencies)
assertNotNull(resourceAssignmentProcessor, "couldn't get kotlin script resource assignment processor")
diff --git a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/capability/jython-resource-definitions.json b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/capability/jython-resource-definitions.json
index fe89291c..b565eec8 100644
--- a/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/capability/jython-resource-definitions.json
+++ b/ms/blueprintsprocessor/functions/resource-resolution/src/test/resources/mapping/capability/jython-resource-definitions.json
@@ -11,7 +11,7 @@
"type": "source-capability",
"properties": {
"script-type": "jython",
- "script-class-reference": "SampleRAProcessor",
+ "script-class-reference": "Scripts/python/SampleRAProcessor.py",
"instance-dependencies": []
}
}