summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-08-31 12:02:02 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-09-11 15:10:58 +0530
commit7200442d081d8bf469379a452c7564b5ad427c42 (patch)
treee92746a55c2ea8552720f1bd0a8a31dca30c731c
parent3a62a31feeb5e4e250e4bfc828d2a2336690d1cd (diff)
Fix verify to report debug info
Issue-ID: CLI-122 Change-Id: I692bc084280d7c445afdcf649a630814b9f986a0 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
-rw-r--r--main/src/main/java/org/onap/cli/main/OnapCli.java6
1 files changed, 6 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 30f5ab70..de6d232e 100644
--- a/main/src/main/java/org/onap/cli/main/OnapCli.java
+++ b/main/src/main/java/org/onap/cli/main/OnapCli.java
@@ -268,7 +268,9 @@ public class OnapCli {
cmd = OnapCommandRegistrar.getRegistrar().get(args.get(0));
OnapCliArgsParser.populateParams(cmd.getParameters(), (List<String>) sampleTest.get(OnapCommandConstants.VERIFY_INPUT));
+ this.print("\n***************Test Command: \n" + sampleTest.get(OnapCommandConstants.VERIFY_INPUT).toString());
+ cmd.getParametersMap().get(OnapCommandConstants.DEFAULT_PARAMETER_DEBUG).setValue(Boolean.TRUE);
Optional<OnapCommandParameter> contextOpt = cmd.getParameters().stream()
.filter(e -> e.getName().equals(OnapCommandConstants.VERIFY_CONTEXT_PARAM))
@@ -301,7 +303,11 @@ public class OnapCli {
} else {
resultAtt.getValues().add(OnapCommandConstants.VERIFY_RESULT_FAIL);
}
+ this.print(testResult.getDebugInfo());
+ this.print("\n***************Expected Output: \n" + expectedOutput);
+ this.print("\n***************Actual Output: \n" + actualOutput);
}
+
this.print(testSuiteResult.print());
}
/**