File tree Expand file tree Collapse file tree 7 files changed +14
-14
lines changed
Expand file tree Collapse file tree 7 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 11package node
22
33import (
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}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package node
22
33import (
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}
Original file line number Diff line number Diff line change 11package node
22
33import (
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}
Original file line number Diff line number Diff line change 11package node
22
33import (
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}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ package node
33import (
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}
Original file line number Diff line number Diff line change 11package node
22
33import (
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}
Original file line number Diff line number Diff line change 11package node
22
33import (
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}
You can’t perform that action at this time.
0 commit comments