diff --git a/cli/command/volume/create_test.go b/cli/command/volume/create_test.go index 0b1562a75f..d05e8be78d 100644 --- a/cli/command/volume/create_test.go +++ b/cli/command/volume/create_test.go @@ -1,7 +1,7 @@ package volume import ( - "io/ioutil" + "io" "reflect" "strings" "testing" @@ -49,7 +49,7 @@ func TestVolumeCreateErrors(t *testing.T) { for key, value := range tc.flags { cmd.Flags().Set(key, value) } - cmd.SetOut(ioutil.Discard) + cmd.SetOut(io.Discard) assert.ErrorContains(t, cmd.Execute(), tc.expectedError) } } diff --git a/cli/command/volume/inspect_test.go b/cli/command/volume/inspect_test.go index 563e92202e..929a4f08a6 100644 --- a/cli/command/volume/inspect_test.go +++ b/cli/command/volume/inspect_test.go @@ -2,7 +2,7 @@ package volume import ( "fmt" - "io/ioutil" + "io" "testing" "github.com/docker/cli/internal/test" @@ -60,7 +60,7 @@ func TestVolumeInspectErrors(t *testing.T) { for key, value := range tc.flags { cmd.Flags().Set(key, value) } - cmd.SetOut(ioutil.Discard) + cmd.SetOut(io.Discard) assert.ErrorContains(t, cmd.Execute(), tc.expectedError) } } diff --git a/cli/command/volume/list_test.go b/cli/command/volume/list_test.go index 2c1501e5c7..77f63d5219 100644 --- a/cli/command/volume/list_test.go +++ b/cli/command/volume/list_test.go @@ -1,7 +1,7 @@ package volume import ( - "io/ioutil" + "io" "testing" "github.com/docker/cli/cli/config/configfile" @@ -43,7 +43,7 @@ func TestVolumeListErrors(t *testing.T) { for key, value := range tc.flags { cmd.Flags().Set(key, value) } - cmd.SetOut(ioutil.Discard) + cmd.SetOut(io.Discard) assert.ErrorContains(t, cmd.Execute(), tc.expectedError) } } diff --git a/cli/command/volume/prune_test.go b/cli/command/volume/prune_test.go index 8e668c57f6..7cfbad66b3 100644 --- a/cli/command/volume/prune_test.go +++ b/cli/command/volume/prune_test.go @@ -2,7 +2,7 @@ package volume import ( "fmt" - "io/ioutil" + "io" "runtime" "strings" "testing" @@ -48,7 +48,7 @@ func TestVolumePruneErrors(t *testing.T) { for key, value := range tc.flags { cmd.Flags().Set(key, value) } - cmd.SetOut(ioutil.Discard) + cmd.SetOut(io.Discard) assert.ErrorContains(t, cmd.Execute(), tc.expectedError) } } @@ -86,7 +86,7 @@ func TestVolumePrunePromptYes(t *testing.T) { volumePruneFunc: simplePruneFunc, }) - cli.SetIn(streams.NewIn(ioutil.NopCloser(strings.NewReader(input)))) + cli.SetIn(streams.NewIn(io.NopCloser(strings.NewReader(input)))) cmd := NewPruneCommand(cli) assert.NilError(t, cmd.Execute()) golden.Assert(t, cli.OutBuffer().String(), "volume-prune-yes.golden") @@ -102,7 +102,7 @@ func TestVolumePrunePromptNo(t *testing.T) { volumePruneFunc: simplePruneFunc, }) - cli.SetIn(streams.NewIn(ioutil.NopCloser(strings.NewReader(input)))) + cli.SetIn(streams.NewIn(io.NopCloser(strings.NewReader(input)))) cmd := NewPruneCommand(cli) assert.NilError(t, cmd.Execute()) golden.Assert(t, cli.OutBuffer().String(), "volume-prune-no.golden") diff --git a/cli/command/volume/remove_test.go b/cli/command/volume/remove_test.go index 19bc467d70..6f617f9ce0 100644 --- a/cli/command/volume/remove_test.go +++ b/cli/command/volume/remove_test.go @@ -1,7 +1,7 @@ package volume import ( - "io/ioutil" + "io" "testing" "github.com/docker/cli/internal/test" @@ -32,7 +32,7 @@ func TestVolumeRemoveErrors(t *testing.T) { volumeRemoveFunc: tc.volumeRemoveFunc, })) cmd.SetArgs(tc.args) - cmd.SetOut(ioutil.Discard) + cmd.SetOut(io.Discard) assert.ErrorContains(t, cmd.Execute(), tc.expectedError) } }