cli/command/context: remove deprecated io/ioutil

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-02-25 13:12:19 +01:00
parent 43795ec8f7
commit f28c063e2f
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
4 changed files with 8 additions and 8 deletions

View File

@ -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)
}

View File

@ -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)
}

View File

@ -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)
}
}

View File

@ -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)
}
}