diff options
author | 2017-04-24 15:41:05 +0530 | |
---|---|---|
committer | 2017-04-24 15:41:05 +0530 | |
commit | 7f4f6052196f0017f14018d928a8db1147863498 (patch) | |
tree | 8ecfc9fd1b63e103531d65536bddc0b582801d7b /vnf-sdk-function-test/src/main/java | |
parent | d81b728f5bb79ad19934e1605e57962bf3affbc4 (diff) |
Remote command is wrong
Resolved:VNFSDK-21
VNF SDK function test
Change-Id: I327439af685b6a8a69a539c56bee69acff89da80
Signed-off-by: Murali-P <murali.p@huawei.com>
Diffstat (limited to 'vnf-sdk-function-test/src/main/java')
-rw-r--r-- | vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/TaskExecution.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/TaskExecution.java b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/TaskExecution.java index 8e3300e..d55ec98 100644 --- a/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/TaskExecution.java +++ b/vnf-sdk-function-test/src/main/java/org/openo/vnfsdk/functest/TaskExecution.java @@ -126,8 +126,15 @@ public class TaskExecution { // Get environment of given UUID Environment functestEnv = EnvironmentMap.getInstance().getEnv(envId); + if(null == functestEnv) { + LOGGER.error("Function Test Environment details are empty,EnvID = " + envId); + } else { + LOGGER.info("Function Test Environment path,Path = " + functestEnv.getPath()); + } String remoteDir = functestEnv.getPath() + mapValues.get("SCRIPT_NAME"); + + String remoteConfigArgs = remoteDir + "/" + "config.args "; String remoteScriptFile = remoteDir + "/" + mapValues.get("MAIN_SCRIPT"); String remoteScriptResult = remoteDir + "/" + "output "; String dirResult = mapValues.get(ApplicationConstants.DIR_RESULT) + executeId; @@ -138,8 +145,8 @@ public class TaskExecution { remoteArgs = remoteArgs + " -v " + "NODE_USERNAME" + ":" + functestEnv.getUserName() + " "; remoteArgs = remoteArgs + " -v " + "NODE_PASSWORD" + ":" + functestEnv.getPassword() + " "; - String remoteCommand = - ApplicationConstants.ROBOT_SPACE + "-d " + remoteScriptResult + remoteArgs + remoteScriptFile; + String remoteCommand = ApplicationConstants.ROBOT_SPACE + "-d " + remoteScriptResult + "--argumentfile " + + remoteConfigArgs + remoteScriptFile; // set the parameters required by the execute script remoteCommand = "\"" + remoteCommand + "\""; |