removed the output leaked from stack remove error test case

Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: 852bf0f96d
Component: cli
This commit is contained in:
Arash Deshmeh
2017-06-09 11:58:42 -04:00
parent 81261f8161
commit 2180c64b2f

View File

@ -3,6 +3,7 @@ package stack
import (
"bytes"
"errors"
"io/ioutil"
"strings"
"testing"
@ -116,6 +117,7 @@ func TestContinueAfterError(t *testing.T) {
},
}
cmd := newRemoveCommand(test.NewFakeCli(cli, &bytes.Buffer{}))
cmd.SetOutput(ioutil.Discard)
cmd.SetArgs([]string{"foo", "bar"})
assert.EqualError(t, cmd.Execute(), "Failed to remove some resources from stack: foo")