[#51] Remove current-context flag
Executing "airshipctl config set-context [NAME]" misleadingly prints a message saying the context has been modified, but doesn't change to that context or modify any context values. This change modifies the behavior of context command to switch to a provided context when no flags are specified. It also removes the current-context flag, which becomes redundant with this change. Change-Id: I2622fbf59539513feb1236f13b9090978aeb81ef Signed-off-by: Drew Walters <andrew.walters@att.com>
This commit is contained in:
@@ -112,12 +112,9 @@ func TestSetCurrentContext(t *testing.T) {
|
||||
expconf.CurrentContext = "def_target"
|
||||
|
||||
test := setContextTest{
|
||||
description: "Testing 'airshipctl config set-context' with a new current context",
|
||||
config: conf,
|
||||
args: []string{tname},
|
||||
flags: []string{
|
||||
"--" + config.FlagCurrentContext + "=true",
|
||||
},
|
||||
description: "Testing 'airshipctl config set-context' with a new current context",
|
||||
config: conf,
|
||||
args: []string{tname},
|
||||
expected: `Context "` + tname + `" modified.` + "\n",
|
||||
expectedConfig: expconf,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user