allow output patch string in edit command

This commit is contained in:
xilabao
2017-05-19 17:47:07 +08:00
parent d81da03132
commit fe4afa8643
12 changed files with 197 additions and 1 deletions

View File

@@ -49,6 +49,7 @@ type EditTestCase struct {
Args []string `yaml:"args"`
Filename string `yaml:"filename"`
Output string `yaml:"outputFormat"`
OutputPatch string `yaml:"outputPatch"`
SaveConfig string `yaml:"saveConfig"`
Namespace string `yaml:"namespace"`
ExpectedStdout []string `yaml:"expectedStdout"`
@@ -248,6 +249,9 @@ func TestEdit(t *testing.T) {
if len(testcase.Output) > 0 {
cmd.Flags().Set("output", testcase.Output)
}
if len(testcase.OutputPatch) > 0 {
cmd.Flags().Set("output-patch", testcase.OutputPatch)
}
if len(testcase.SaveConfig) > 0 {
cmd.Flags().Set("save-config", testcase.SaveConfig)
}