diff options
author | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2017-10-04 18:21:52 +0530 |
---|---|---|
committer | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2017-11-20 11:32:51 +0530 |
commit | 3387ffb892b85a20ae44ec58a41e1f3f2cb084f0 (patch) | |
tree | 1546466ea4ec4b75c8eb7f7adfff19130b4be4f6 /validate/validation/src/test/java/org | |
parent | 01dbd2dc5ac04c7018d3a474c329b40f33d3c400 (diff) |
Modify validate to include sample plugin
Issue-Id: CLI-66
Change-Id: I3397cd29835c5ac3a95a7f0f80fcee5d1e49de99
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'validate/validation/src/test/java/org')
-rw-r--r-- | validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java b/validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java index 71d015b5..6a6d3823 100644 --- a/validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java +++ b/validate/validation/src/test/java/org/onap/cli/validation/OnapValidationTest.java @@ -57,12 +57,19 @@ public class OnapValidationTest { } @Test - public void validateCommandSchemas() throws IOException, OnapCommandException { - OnapCommandRegistrar.getRegistrar().setEnabledProductVersion("cli-1.0"); - for (ExternalSchema sch : OnapCommandRegistrar.getRegistrar().listCommandInfo()) { - System.out.println( + public void validateCommandsResult() throws IOException, OnapCommandException { + for (String version: OnapCommandRegistrar.getRegistrar().getAvailableProductVersions()) { + OnapCommandRegistrar.getRegistrar().setEnabledProductVersion(version); + System.out.println(version); + System.out.println("==========================\n\n"); + for (ExternalSchema sch : OnapCommandRegistrar.getRegistrar().listCommandInfo()) { + if (sch.getCmdVersion().equals(version)) { + System.out.println( "************************* validate '" + sch.getCmdName() + "' *******************************"); - this.handle(new String[] { "schema-validate", "-l", sch.getSchemaName(), "-i"}); + OnapCommandRegistrar.getRegistrar().setEnabledProductVersion("cli-1.0"); + this.handle(new String[] { "schema-validate", "-l", sch.getSchemaName(), "-i"}); + } + } } } |