print warning when delete current context

This commit is contained in:
AdoHe
2017-03-12 22:29:11 +08:00
parent 2ebf6edef3
commit 8ebc6e91f8
3 changed files with 10 additions and 5 deletions

View File

@@ -65,7 +65,8 @@ func (test deleteContextTest) run(t *testing.T) {
pathOptions.EnvVar = ""
buf := bytes.NewBuffer([]byte{})
cmd := NewCmdConfigDeleteContext(buf, pathOptions)
errBuf := bytes.NewBuffer([]byte{})
cmd := NewCmdConfigDeleteContext(buf, errBuf, pathOptions)
cmd.SetArgs([]string{test.contextToDelete})
if err := cmd.Execute(); err != nil {
t.Fatalf("unexpected error executing command: %v", err)