diff --git a/cmd/dump_test.go b/cmd/dump_test.go index d9e16505..fea44779 100644 --- a/cmd/dump_test.go +++ b/cmd/dump_test.go @@ -1,6 +1,7 @@ package cmd import ( + "io" "net/url" "testing" @@ -140,6 +141,7 @@ func TestDumpCmd(t *testing.T) { if err != nil { t.Fatal(err) } + cmd.SetOutput(io.Discard) cmd.SetArgs(append([]string{"dump"}, tt.args...)) err = cmd.Execute() switch { diff --git a/cmd/prune_test.go b/cmd/prune_test.go index ef502969..f160a12f 100644 --- a/cmd/prune_test.go +++ b/cmd/prune_test.go @@ -1,6 +1,7 @@ package cmd import ( + "io" "net/url" "testing" @@ -43,6 +44,7 @@ func TestPruneCmd(t *testing.T) { if err != nil { t.Fatal(err) } + cmd.SetOutput(io.Discard) cmd.SetArgs(append([]string{"prune"}, tt.args...)) err = cmd.Execute() switch { diff --git a/cmd/restore_test.go b/cmd/restore_test.go index cd280aa0..3484f1b2 100644 --- a/cmd/restore_test.go +++ b/cmd/restore_test.go @@ -1,6 +1,7 @@ package cmd import ( + "io" "net/url" "testing" @@ -49,6 +50,7 @@ func TestRestoreCmd(t *testing.T) { if err != nil { t.Fatal(err) } + cmd.SetOutput(io.Discard) cmd.SetArgs(append([]string{"restore"}, tt.args...)) err = cmd.Execute() switch {