aboutsummaryrefslogtreecommitdiffstats
path: root/ms/blueprintsprocessor/functions/netconf-executor/src/test
diff options
context:
space:
mode:
authorMuthuramalingam, Brinda Santh <brindasanth@in.ibm.com>2019-02-12 15:26:19 -0500
committerMuthuramalingam, Brinda Santh <brindasanth@in.ibm.com>2019-02-12 15:26:19 -0500
commit92148caefffdee433e1ed9f1edc17858e6de1e49 (patch)
tree25d37d0853a9ed9aa465aeb7438b4932b3f5e771 /ms/blueprintsprocessor/functions/netconf-executor/src/test
parent7aa5df8cb06e0197d0d750f479c7b09b695b534c (diff)
Add netconf script component function
Change-Id: I094025fba5626bae0b4b13320f1cbbb76cda3bfd Issue-ID: CCSDK-790 Signed-off-by: Muthuramalingam, Brinda Santh <brindasanth@in.ibm.com>
Diffstat (limited to 'ms/blueprintsprocessor/functions/netconf-executor/src/test')
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt10
-rw-r--r--ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/NetconfSessionImplTest.kt9
2 files changed, 11 insertions, 8 deletions
diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt
index c33bfcfa8..d6f737fdd 100644
--- a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt
+++ b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/ComponentNetconfExecutorTest.kt
@@ -22,7 +22,7 @@ import com.fasterxml.jackson.databind.JsonNode
import org.junit.Test
import org.junit.runner.RunWith
import org.onap.ccsdk.apps.blueprintsprocessor.core.api.data.ExecutionServiceInput
-import org.onap.ccsdk.apps.blueprintsprocessor.functions.python.executor.BlueprintPythonService
+import org.onap.ccsdk.apps.blueprintsprocessor.functions.python.executor.BlueprintJythonService
import org.onap.ccsdk.apps.blueprintsprocessor.functions.python.executor.PythonExecutorProperty
import org.onap.ccsdk.apps.controllerblueprints.core.BluePrintConstants
import org.onap.ccsdk.apps.controllerblueprints.core.asJsonNode
@@ -35,10 +35,10 @@ import org.springframework.test.context.TestPropertySource
import org.springframework.test.context.junit4.SpringRunner
@RunWith(SpringRunner::class)
-@ContextConfiguration(classes = [NetconfExecutorConfiguration::class, BlueprintPythonService::class,
+@ContextConfiguration(classes = [NetconfExecutorConfiguration::class, BlueprintJythonService::class,
PythonExecutorProperty::class])
@TestPropertySource(properties =
-["blueprints.processor.functions.python.executor.modulePaths=./../../../../components/scripts/python/ccsdk_netconf;./../../../../components/scripts/python/ccsdk_blueprints",
+["blueprints.processor.functions.python.executor.modulePaths=./../../../../components/scripts/python/ccsdk_netconf,./../../../../components/scripts/python/ccsdk_blueprints",
"blueprints.processor.functions.python.executor.executionPath=./../../../../components/scripts/python/ccsdk_netconf"])
class ComponentNetconfExecutorTest {
@@ -70,9 +70,7 @@ class ComponentNetconfExecutorTest {
componentNetconfExecutor.bluePrintRuntimeService = bluePrintRuntimeService
componentNetconfExecutor.stepName = "activate-netconf"
-
- //TODO to fix build issue
- //componentNetconfExecutor.apply(executionServiceInput)
+ componentNetconfExecutor.apply(executionServiceInput)
}
}
diff --git a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/NetconfSessionImplTest.kt b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/NetconfSessionImplTest.kt
index eefead21e..4ee48bc82 100644
--- a/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/NetconfSessionImplTest.kt
+++ b/ms/blueprintsprocessor/functions/netconf-executor/src/test/kotlin/org/onap/ccsdk/apps/blueprintsprocessor/functions/netconf/executor/NetconfSessionImplTest.kt
@@ -18,7 +18,6 @@ package org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor
import org.junit.After
import org.junit.Assert
import org.junit.Before
-import org.junit.Test
import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.core.NetconfSessionImpl
import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.interfaces.DeviceInfo
import org.onap.ccsdk.apps.blueprintsprocessor.functions.netconf.executor.utils.NetconfDeviceSimulator
@@ -31,7 +30,13 @@ class NetconfSessionImplTest {
@Before
fun before() {
- deviceInfo =DeviceInfo("name", "password", "localhost", 2224, "10")
+ deviceInfo = DeviceInfo().apply {
+ name = "name"
+ pass = "password"
+ ipAddress = "localhost"
+ port = 2224
+ connectTimeoutSec = 10
+ }
device = NetconfDeviceSimulator(deviceInfo!!.port)
device!!.start()