From f28c063e2f7320200a68eeea35e42e983f601978 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 25 Feb 2022 13:12:19 +0100 Subject: [PATCH] cli/command/context: remove deprecated io/ioutil Signed-off-by: Sebastiaan van Stijn --- cli/command/network/connect_test.go | 4 ++-- cli/command/network/create_test.go | 4 ++-- cli/command/network/disconnect_test.go | 4 ++-- cli/command/network/list_test.go | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cli/command/network/connect_test.go b/cli/command/network/connect_test.go index bc1432b625..c245a78543 100644 --- a/cli/command/network/connect_test.go +++ b/cli/command/network/connect_test.go @@ -2,7 +2,7 @@ package network import ( "context" - "io/ioutil" + "io" "testing" "github.com/docker/cli/internal/test" @@ -37,7 +37,7 @@ func TestNetworkConnectErrors(t *testing.T) { }), ) cmd.SetArgs(tc.args) - cmd.SetOut(ioutil.Discard) + cmd.SetOut(io.Discard) assert.ErrorContains(t, cmd.Execute(), tc.expectedError) } diff --git a/cli/command/network/create_test.go b/cli/command/network/create_test.go index 307b5a1487..ec96c58749 100644 --- a/cli/command/network/create_test.go +++ b/cli/command/network/create_test.go @@ -2,7 +2,7 @@ package network import ( "context" - "io/ioutil" + "io" "strings" "testing" @@ -137,7 +137,7 @@ func TestNetworkCreateErrors(t *testing.T) { for key, value := range tc.flags { assert.NilError(t, 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/network/disconnect_test.go b/cli/command/network/disconnect_test.go index 4413b95e51..e60ecd6ac0 100644 --- a/cli/command/network/disconnect_test.go +++ b/cli/command/network/disconnect_test.go @@ -2,7 +2,7 @@ package network import ( "context" - "io/ioutil" + "io" "testing" "github.com/docker/cli/internal/test" @@ -35,7 +35,7 @@ func TestNetworkDisconnectErrors(t *testing.T) { }), ) cmd.SetArgs(tc.args) - cmd.SetOut(ioutil.Discard) + cmd.SetOut(io.Discard) assert.ErrorContains(t, cmd.Execute(), tc.expectedError) } } diff --git a/cli/command/network/list_test.go b/cli/command/network/list_test.go index 0cb3b04975..99bd8508b9 100644 --- a/cli/command/network/list_test.go +++ b/cli/command/network/list_test.go @@ -2,7 +2,7 @@ package network import ( "context" - "io/ioutil" + "io" "testing" "github.com/docker/cli/internal/test" @@ -35,7 +35,7 @@ func TestNetworkListErrors(t *testing.T) { networkListFunc: tc.networkListFunc, }), ) - cmd.SetOut(ioutil.Discard) + cmd.SetOut(io.Discard) assert.ErrorContains(t, cmd.Execute(), tc.expectedError) } }