aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/test/java/org
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-09-20 16:34:10 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-11-14 14:38:13 +0530
commit1ecc057676a6ef788d5193261abd98bd364f10c0 (patch)
tree8b2df724a18ee189ccfef46467e88e3138595a68 /framework/src/test/java/org
parent92075994f7a2a399f2dced6fb207ebb4e717d8f0 (diff)
Migrate onap-username and onap-password
onap-username and onap-password are migrated into host-username and host-password respectively Issue-Id: CLI-66 Change-Id: I4d658283523e75a2223dac9d0b839fdbc6ae2da3 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'framework/src/test/java/org')
-rw-r--r--framework/src/test/java/org/onap/cli/fw/cmd/OnapHttpCommandTest.java8
-rw-r--r--framework/src/test/java/org/onap/cli/fw/cmd/OnapSchemaValidateCommandTest.java8
-rw-r--r--framework/src/test/java/org/onap/cli/fw/defaultParameter/TestDefaultParameterSection.java16
3 files changed, 16 insertions, 16 deletions
diff --git a/framework/src/test/java/org/onap/cli/fw/cmd/OnapHttpCommandTest.java b/framework/src/test/java/org/onap/cli/fw/cmd/OnapHttpCommandTest.java
index bfdb14a5..7552cacb 100644
--- a/framework/src/test/java/org/onap/cli/fw/cmd/OnapHttpCommandTest.java
+++ b/framework/src/test/java/org/onap/cli/fw/cmd/OnapHttpCommandTest.java
@@ -31,12 +31,12 @@ public class OnapHttpCommandTest {
@Test(expected = OnapCommandException.class)
public void runTest() throws OnapCommandException {
OnapCommandParameter param1 = new OnapCommandParameter();
- param1.setLongOption("onap-username");
- param1.setName("onap-username");
+ param1.setLongOption("host-username");
+ param1.setName("host-username");
param1.setParameterType(ParameterType.STRING);
OnapCommandParameter param2 = new OnapCommandParameter();
- param2.setLongOption("onap-password");
- param2.setName("onap-password");
+ param2.setLongOption("host-password");
+ param2.setName("host-password");
param2.setParameterType(ParameterType.STRING);
OnapCommandParameter param3 = new OnapCommandParameter();
param3.setLongOption("host-url");
diff --git a/framework/src/test/java/org/onap/cli/fw/cmd/OnapSchemaValidateCommandTest.java b/framework/src/test/java/org/onap/cli/fw/cmd/OnapSchemaValidateCommandTest.java
index 89c32c99..2355d668 100644
--- a/framework/src/test/java/org/onap/cli/fw/cmd/OnapSchemaValidateCommandTest.java
+++ b/framework/src/test/java/org/onap/cli/fw/cmd/OnapSchemaValidateCommandTest.java
@@ -28,9 +28,9 @@ public class OnapSchemaValidateCommandTest {
OnapSchemaValidateCommand cmd = new OnapSchemaValidateCommand();
cmd.initializeSchema("schema-validate.yaml");
for (OnapCommandParameter param : cmd.getParameters()) {
- if ("onap-username".equals(param.getName())) {
+ if ("host-username".equals(param.getName())) {
param.setValue("test");
- } else if ("onap-password".equals(param.getName())) {
+ } else if ("host-password".equals(param.getName())) {
param.setValue("test");
} else if ("host-url".equals(param.getName())) {
param.setValue("test-url");
@@ -48,9 +48,9 @@ public class OnapSchemaValidateCommandTest {
OnapSchemaValidateCommand cmd = new OnapSchemaValidateCommand();
cmd.initializeSchema("schema-validate.yaml");
for (OnapCommandParameter param : cmd.getParameters()) {
- if ("onap-username".equals(param.getName())) {
+ if ("host-username".equals(param.getName())) {
param.setValue("test");
- } else if ("onap-password".equals(param.getName())) {
+ } else if ("host-password".equals(param.getName())) {
param.setValue("test");
} else if ("host-url".equals(param.getName())) {
param.setValue("test-url");
diff --git a/framework/src/test/java/org/onap/cli/fw/defaultParameter/TestDefaultParameterSection.java b/framework/src/test/java/org/onap/cli/fw/defaultParameter/TestDefaultParameterSection.java
index 20ca10f7..b0590791 100644
--- a/framework/src/test/java/org/onap/cli/fw/defaultParameter/TestDefaultParameterSection.java
+++ b/framework/src/test/java/org/onap/cli/fw/defaultParameter/TestDefaultParameterSection.java
@@ -41,8 +41,8 @@ public class TestDefaultParameterSection {
OnapCommandUtils.loadSchema(cmd, "sample-test-include-param.yaml", true, false);
List<String> parameters = cmd.getParameters().stream().map(p -> p.getName()).collect(Collectors.toList());
- assertTrue(parameters.contains("onap-username"));
- assertTrue(parameters.contains("onap-password"));
+ assertTrue(parameters.contains("host-username"));
+ assertTrue(parameters.contains("host-password"));
assertTrue(parameters.contains("host-url"));
}
@@ -55,8 +55,8 @@ public class TestDefaultParameterSection {
OnapCommandUtils.loadSchema(cmd, "sample-test-exclude-param.yaml", true, false);
List<String> parameters = cmd.getParameters().stream().map(p -> p.getName()).collect(Collectors.toList());
- assertTrue(parameters.contains("onap-username"));
- assertTrue(parameters.contains("onap-password"));
+ assertTrue(parameters.contains("host-username"));
+ assertTrue(parameters.contains("host-password"));
assertTrue(parameters.contains("host-url"));
assertFalse(parameters.contains("long"));
assertFalse(parameters.contains("format"));
@@ -73,8 +73,8 @@ public class TestDefaultParameterSection {
OnapCommandUtils.loadSchema(cmd, "sample-test-include-exclude.yaml", true, false);
List<String> parameters = cmd.getParameters().stream().map(p -> p.getName()).collect(Collectors.toList());
- assertTrue(parameters.contains("onap-username"));
- assertTrue(parameters.contains("onap-password"));
+ assertTrue(parameters.contains("host-username"));
+ assertTrue(parameters.contains("host-password"));
assertTrue(parameters.contains("host-url"));
}
@@ -88,8 +88,8 @@ public class TestDefaultParameterSection {
OnapCommandUtils.loadSchema(cmd, "onap-test-schema.yaml", true, false);
List<String> parameters = cmd.getParameters().stream().map(p -> p.getName()).collect(Collectors.toList());
- assertFalse(parameters.contains("onap-username"));
- assertFalse(parameters.contains("onap-password"));
+ assertFalse(parameters.contains("host-username"));
+ assertFalse(parameters.contains("host-password"));
assertTrue(parameters.contains("host-url"));
assertTrue(parameters.contains("debug"));
assertTrue(parameters.contains("long"));