summaryrefslogtreecommitdiffstats
path: root/vnf-sdk-function-test
diff options
context:
space:
mode:
authorKailun Qin <kailun.qin@intel.com>2018-09-07 22:03:38 +0800
committerKailun Qin <kailun.qin@intel.com>2018-09-13 03:48:47 +0800
commitec73eb1cc6d4f7c78f320dcb815a021dcadbd503 (patch)
treedf21d713334b86309e10252ab7a9e2e6dac374ea /vnf-sdk-function-test
parent28780105f9e027c1b9f9653930cbbefeb598821a (diff)
Code clean up for functest
Remove some deprecated code, such as ObjectMapper etc. Change-Id: I1e6498a655a973ce508a35b874c36cd3f4b8b5f6 Issue-ID: VNFSDK-320 Signed-off-by: Kailun Qin <kailun.qin@intel.com>
Diffstat (limited to 'vnf-sdk-function-test')
-rw-r--r--vnf-sdk-function-test/src/main/java/org/onap/vnfsdk/functest/TaskExecution.java10
-rw-r--r--vnf-sdk-function-test/src/main/java/org/onap/vnfsdk/functest/db/TaskMgrCaseTblDAO.java1
-rw-r--r--vnf-sdk-function-test/src/main/java/org/onap/vnfsdk/functest/responsehandler/VnfFuncTestResponseHandler.java2
-rw-r--r--vnf-sdk-function-test/src/main/java/org/onap/vnfsdk/functest/scriptmgr/ScriptManager.java2
4 files changed, 0 insertions, 15 deletions
diff --git a/vnf-sdk-function-test/src/main/java/org/onap/vnfsdk/functest/TaskExecution.java b/vnf-sdk-function-test/src/main/java/org/onap/vnfsdk/functest/TaskExecution.java
index b7f674a..8796baa 100644
--- a/vnf-sdk-function-test/src/main/java/org/onap/vnfsdk/functest/TaskExecution.java
+++ b/vnf-sdk-function-test/src/main/java/org/onap/vnfsdk/functest/TaskExecution.java
@@ -47,12 +47,8 @@ public class TaskExecution {
String confDir = curDir + nl + ApplicationConstants.CONF + nl + ApplicationConstants.ROBOT + nl;
// Read the MetaData from the VNF package
-// ObjectMapper mapper = new ObjectMapper();
-
Map<String, String> mapValues = null;
try {
-// mapValues =
-// mapper.readValue(new FileInputStream(confDir + ApplicationConstants.ROBOTMETADATA_JSON), Map.class);
mapValues = new Gson().fromJson(new JsonReader(new FileReader(confDir + ApplicationConstants.ROBOTMETADATA_JSON)), Map.class);
} catch (IOException e) {
@@ -123,11 +119,8 @@ public class TaskExecution {
String confDir = curDir + nl + ApplicationConstants.CONF + nl + ApplicationConstants.ROBOT + nl;
// Read the MetaData from the VNF package
-// ObjectMapper mapper = new ObjectMapper();
Map<String, String> mapValues = null;
try {
-// mapValues =
-// mapper.readValue(new FileInputStream(confDir + ApplicationConstants.ROBOTMETADATA_JSON), Map.class);
mapValues = new Gson().fromJson(new JsonReader(new FileReader(confDir + ApplicationConstants.ROBOTMETADATA_JSON)), Map.class);
} catch (IOException e) {
@@ -211,12 +204,9 @@ public class TaskExecution {
String confDir = curDir + nl + ApplicationConstants.CONF + nl + ApplicationConstants.ROBOT + nl;
// Read the MetaData from the VNF package
-// ObjectMapper mapper = new ObjectMapper();
Map<String, String> mapValues = null;
try {
-// mapValues =
-// mapper.readValue(new FileInputStream(confDir + ApplicationConstants.ROBOTMETADATA_JSON), Map.class);
mapValues = new Gson().fromJson(new JsonReader(new FileReader(confDir + ApplicationConstants.ROBOTMETADATA_JSON)), Map.class);
} catch (Exception e) {
diff --git a/vnf-sdk-function-test/src/main/java/org/onap/vnfsdk/functest/db/TaskMgrCaseTblDAO.java b/vnf-sdk-function-test/src/main/java/org/onap/vnfsdk/functest/db/TaskMgrCaseTblDAO.java
index f228ab5..837ff07 100644
--- a/vnf-sdk-function-test/src/main/java/org/onap/vnfsdk/functest/db/TaskMgrCaseTblDAO.java
+++ b/vnf-sdk-function-test/src/main/java/org/onap/vnfsdk/functest/db/TaskMgrCaseTblDAO.java
@@ -28,7 +28,6 @@ public class TaskMgrCaseTblDAO extends AbstractDAO<CaseRecord> {
}
public CaseRecord findByTaskID(String taskID) {
- //return Optional.ofNullable(get(taskID));
return get(taskID);
}
diff --git a/vnf-sdk-function-test/src/main/java/org/onap/vnfsdk/functest/responsehandler/VnfFuncTestResponseHandler.java b/vnf-sdk-function-test/src/main/java/org/onap/vnfsdk/functest/responsehandler/VnfFuncTestResponseHandler.java
index 0dce5a0..1efced0 100644
--- a/vnf-sdk-function-test/src/main/java/org/onap/vnfsdk/functest/responsehandler/VnfFuncTestResponseHandler.java
+++ b/vnf-sdk-function-test/src/main/java/org/onap/vnfsdk/functest/responsehandler/VnfFuncTestResponseHandler.java
@@ -60,10 +60,8 @@ public class VnfFuncTestResponseHandler {
private static void loadConfigurations() {
String curDir = System.getProperty("user.dir");
String confDir = curDir + File.separator + "conf" + File.separator + "robot" + File.separator;
-// ObjectMapper mapper = new ObjectMapper();
try {
-// mapConfigValues = mapper.readValue(new FileInputStream(confDir + "robotMetaData.json"), Map.class);
mapConfigValues = new Gson().fromJson(new JsonReader(new FileReader(confDir + "robotMetaData.json")), Map.class);
} catch (IOException e) {
logger.error("Reading Json Meta data file failed or file do not exist", e);
diff --git a/vnf-sdk-function-test/src/main/java/org/onap/vnfsdk/functest/scriptmgr/ScriptManager.java b/vnf-sdk-function-test/src/main/java/org/onap/vnfsdk/functest/scriptmgr/ScriptManager.java
index 8b1ff4c..c46f7b5 100644
--- a/vnf-sdk-function-test/src/main/java/org/onap/vnfsdk/functest/scriptmgr/ScriptManager.java
+++ b/vnf-sdk-function-test/src/main/java/org/onap/vnfsdk/functest/scriptmgr/ScriptManager.java
@@ -102,8 +102,6 @@ public class ScriptManager {
final UUID envID = UUID.randomUUID();
// Convert input string to Environment class
-// ObjectMapper mapper = new ObjectMapper();
-// Environment envObj = mapper.readValue(env, Environment.class);
Environment envObj = new Gson().fromJson(env, Environment.class);
if (null == envObj) {
// Converting input to Env object failed