summaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorKanagaraj Manickam <kanagaraj.manickam@huawei.com>2018-03-26 06:49:35 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-26 06:49:35 +0000
commitc8114fe928e3a6c48ea02fa8e2a168f7102f770b (patch)
tree44bdeb88ee7642eda8077afefcfd4bbbb98d3f22 /main
parent5c094b10096c629804b9e266d05b74e90512ad8b (diff)
parent8c08476d0b6bffa3230a0e34ff29586eefed38e0 (diff)
Merge "Enable feature to disable mock for verify"
Diffstat (limited to 'main')
-rw-r--r--main/src/main/java/org/onap/cli/main/OnapCli.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/main/src/main/java/org/onap/cli/main/OnapCli.java b/main/src/main/java/org/onap/cli/main/OnapCli.java
index 3ba75711..e7fddcd5 100644
--- a/main/src/main/java/org/onap/cli/main/OnapCli.java
+++ b/main/src/main/java/org/onap/cli/main/OnapCli.java
@@ -219,6 +219,13 @@ public class OnapCli {
}
public void verifyCommand(OnapCommand cmd) throws OnapCommandException {
+
+ OnapCliArgsParser.populateParams(cmd.getParameters(), args);
+
+ Optional<OnapCommandParameter> contextOptArg = cmd.getParameters().stream()
+ .filter(e -> e.getName().equals(OnapCommandConstants.VERIFY_CONTEXT_PARAM))
+ .findFirst();
+
List<Map<String, ?>> testSuite = OnapCommandRegistrar.getRegistrar().getTestSuite(cmd.getName());
OnapCommandResult testSuiteResult = new OnapCommandResult();
@@ -254,6 +261,12 @@ public class OnapCli {
if (contextOpt.isPresent()) {
HashMap map = new HashMap();
map.put(OnapCommandConstants.VERIFY_MOCO, sampleTest.get(OnapCommandConstants.VERIFY_MOCO));
+
+ if (contextOptArg.isPresent()) {
+ OnapCommandParameter contextArg = contextOptArg.get();
+ map.putAll((Map) contextArg.getValue());
+ }
+
contextOpt.get().setValue(map);
}