make edit respect --save-config
This commit is contained in:
@@ -49,6 +49,7 @@ type EditTestCase struct {
|
||||
Args []string `yaml:"args"`
|
||||
Filename string `yaml:"filename"`
|
||||
Output string `yaml:"outputFormat"`
|
||||
SaveConfig string `yaml:"saveConfig"`
|
||||
Namespace string `yaml:"namespace"`
|
||||
ExpectedStdout []string `yaml:"expectedStdout"`
|
||||
ExpectedStderr []string `yaml:"expectedStderr"`
|
||||
@@ -247,6 +248,9 @@ func TestEdit(t *testing.T) {
|
||||
if len(testcase.Output) > 0 {
|
||||
cmd.Flags().Set("output", testcase.Output)
|
||||
}
|
||||
if len(testcase.SaveConfig) > 0 {
|
||||
cmd.Flags().Set("save-config", testcase.SaveConfig)
|
||||
}
|
||||
|
||||
cmdutil.BehaviorOnFatal(func(str string, code int) {
|
||||
errBuf.WriteString(str)
|
||||
|
||||
Reference in New Issue
Block a user