Skip to content

Commit 9bdeb09

Browse files
committed
cli/command/node: remove deprecated io/ioutil
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent f28c063 commit 9bdeb09

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

cli/command/node/demote_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package node
22

33
import (
4-
"io/ioutil"
4+
"io"
55
"testing"
66

77
"github.com/docker/cli/internal/test"
@@ -43,7 +43,7 @@ func TestNodeDemoteErrors(t *testing.T) {
4343
nodeUpdateFunc: tc.nodeUpdateFunc,
4444
}))
4545
cmd.SetArgs(tc.args)
46-
cmd.SetOut(ioutil.Discard)
46+
cmd.SetOut(io.Discard)
4747
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
4848
}
4949
}

cli/command/node/inspect_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package node
22

33
import (
44
"fmt"
5-
"io/ioutil"
5+
"io"
66
"testing"
77

88
"github.com/docker/cli/internal/test"
@@ -73,7 +73,7 @@ func TestNodeInspectErrors(t *testing.T) {
7373
for key, value := range tc.flags {
7474
cmd.Flags().Set(key, value)
7575
}
76-
cmd.SetOut(ioutil.Discard)
76+
cmd.SetOut(io.Discard)
7777
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
7878
}
7979
}

cli/command/node/list_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package node
22

33
import (
4-
"io/ioutil"
4+
"io"
55
"testing"
66

77
"github.com/docker/cli/cli/config/configfile"
@@ -47,7 +47,7 @@ func TestNodeListErrorOnAPIFailure(t *testing.T) {
4747
infoFunc: tc.infoFunc,
4848
})
4949
cmd := newListCommand(cli)
50-
cmd.SetOut(ioutil.Discard)
50+
cmd.SetOut(io.Discard)
5151
assert.Error(t, cmd.Execute(), tc.expectedError)
5252
}
5353
}

cli/command/node/promote_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package node
22

33
import (
4-
"io/ioutil"
4+
"io"
55
"testing"
66

77
"github.com/docker/cli/internal/test"
@@ -43,7 +43,7 @@ func TestNodePromoteErrors(t *testing.T) {
4343
nodeUpdateFunc: tc.nodeUpdateFunc,
4444
}))
4545
cmd.SetArgs(tc.args)
46-
cmd.SetOut(ioutil.Discard)
46+
cmd.SetOut(io.Discard)
4747
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
4848
}
4949
}

cli/command/node/ps_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package node
33
import (
44
"context"
55
"fmt"
6-
"io/ioutil"
6+
"io"
77
"testing"
88
"time"
99

@@ -59,7 +59,7 @@ func TestNodePsErrors(t *testing.T) {
5959
for key, value := range tc.flags {
6060
cmd.Flags().Set(key, value)
6161
}
62-
cmd.SetOut(ioutil.Discard)
62+
cmd.SetOut(io.Discard)
6363
assert.Error(t, cmd.Execute(), tc.expectedError)
6464
}
6565
}

cli/command/node/remove_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package node
22

33
import (
4-
"io/ioutil"
4+
"io"
55
"testing"
66

77
"github.com/docker/cli/internal/test"
@@ -32,7 +32,7 @@ func TestNodeRemoveErrors(t *testing.T) {
3232
nodeRemoveFunc: tc.nodeRemoveFunc,
3333
}))
3434
cmd.SetArgs(tc.args)
35-
cmd.SetOut(ioutil.Discard)
35+
cmd.SetOut(io.Discard)
3636
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
3737
}
3838
}

cli/command/node/update_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package node
22

33
import (
4-
"io/ioutil"
4+
"io"
55
"testing"
66

77
"github.com/docker/cli/internal/test"
@@ -63,7 +63,7 @@ func TestNodeUpdateErrors(t *testing.T) {
6363
for key, value := range tc.flags {
6464
cmd.Flags().Set(key, value)
6565
}
66-
cmd.SetOut(ioutil.Discard)
66+
cmd.SetOut(io.Discard)
6767
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
6868
}
6969
}

0 commit comments

Comments
 (0)