diff --git a/cli/command/node/demote_test.go b/cli/command/node/demote_test.go index c4d6c26769..8c226a9f9f 100644 --- a/cli/command/node/demote_test.go +++ b/cli/command/node/demote_test.go @@ -1,7 +1,7 @@ package node import ( - "io/ioutil" + "io" "testing" "github.com/docker/cli/internal/test" @@ -43,7 +43,7 @@ func TestNodeDemoteErrors(t *testing.T) { nodeUpdateFunc: tc.nodeUpdateFunc, })) cmd.SetArgs(tc.args) - cmd.SetOut(ioutil.Discard) + cmd.SetOut(io.Discard) assert.ErrorContains(t, cmd.Execute(), tc.expectedError) } } diff --git a/cli/command/node/inspect_test.go b/cli/command/node/inspect_test.go index 975db14b7c..2c2e33bedf 100644 --- a/cli/command/node/inspect_test.go +++ b/cli/command/node/inspect_test.go @@ -2,7 +2,7 @@ package node import ( "fmt" - "io/ioutil" + "io" "testing" "github.com/docker/cli/internal/test" @@ -73,7 +73,7 @@ func TestNodeInspectErrors(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/node/list_test.go b/cli/command/node/list_test.go index 309bd3798a..6c176795fc 100644 --- a/cli/command/node/list_test.go +++ b/cli/command/node/list_test.go @@ -1,7 +1,7 @@ package node import ( - "io/ioutil" + "io" "testing" "github.com/docker/cli/cli/config/configfile" @@ -47,7 +47,7 @@ func TestNodeListErrorOnAPIFailure(t *testing.T) { infoFunc: tc.infoFunc, }) cmd := newListCommand(cli) - cmd.SetOut(ioutil.Discard) + cmd.SetOut(io.Discard) assert.Error(t, cmd.Execute(), tc.expectedError) } } diff --git a/cli/command/node/promote_test.go b/cli/command/node/promote_test.go index 68299d2983..ebb2890ec2 100644 --- a/cli/command/node/promote_test.go +++ b/cli/command/node/promote_test.go @@ -1,7 +1,7 @@ package node import ( - "io/ioutil" + "io" "testing" "github.com/docker/cli/internal/test" @@ -43,7 +43,7 @@ func TestNodePromoteErrors(t *testing.T) { nodeUpdateFunc: tc.nodeUpdateFunc, })) cmd.SetArgs(tc.args) - cmd.SetOut(ioutil.Discard) + cmd.SetOut(io.Discard) assert.ErrorContains(t, cmd.Execute(), tc.expectedError) } } diff --git a/cli/command/node/ps_test.go b/cli/command/node/ps_test.go index 2b6ab9a7a1..870e8eb187 100644 --- a/cli/command/node/ps_test.go +++ b/cli/command/node/ps_test.go @@ -3,7 +3,7 @@ package node import ( "context" "fmt" - "io/ioutil" + "io" "testing" "time" @@ -59,7 +59,7 @@ func TestNodePsErrors(t *testing.T) { for key, value := range tc.flags { cmd.Flags().Set(key, value) } - cmd.SetOut(ioutil.Discard) + cmd.SetOut(io.Discard) assert.Error(t, cmd.Execute(), tc.expectedError) } } diff --git a/cli/command/node/remove_test.go b/cli/command/node/remove_test.go index e4eaf9df71..db7bbcc7de 100644 --- a/cli/command/node/remove_test.go +++ b/cli/command/node/remove_test.go @@ -1,7 +1,7 @@ package node import ( - "io/ioutil" + "io" "testing" "github.com/docker/cli/internal/test" @@ -32,7 +32,7 @@ func TestNodeRemoveErrors(t *testing.T) { nodeRemoveFunc: tc.nodeRemoveFunc, })) cmd.SetArgs(tc.args) - cmd.SetOut(ioutil.Discard) + cmd.SetOut(io.Discard) assert.ErrorContains(t, cmd.Execute(), tc.expectedError) } } diff --git a/cli/command/node/update_test.go b/cli/command/node/update_test.go index 879855bfab..797f79f621 100644 --- a/cli/command/node/update_test.go +++ b/cli/command/node/update_test.go @@ -1,7 +1,7 @@ package node import ( - "io/ioutil" + "io" "testing" "github.com/docker/cli/internal/test" @@ -63,7 +63,7 @@ func TestNodeUpdateErrors(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) } }