diff --git a/cli/command/container/run_test.go b/cli/command/container/run_test.go index 2dcf1af240..4938a56446 100644 --- a/cli/command/container/run_test.go +++ b/cli/command/container/run_test.go @@ -2,6 +2,7 @@ package container import ( "fmt" + "io/ioutil" "testing" "github.com/docker/cli/internal/test" @@ -66,6 +67,7 @@ func TestRunCommandWithContentTrustErrors(t *testing.T) { cli.SetNotaryClient(tc.notaryFunc) cmd := NewRunCommand(cli) cmd.SetArgs(tc.args) + cmd.SetOutput(ioutil.Discard) err := cmd.Execute() assert.Assert(t, err != nil) assert.Assert(t, is.Contains(cli.ErrBuffer().String(), tc.expectedError))