mirror of https://github.com/docker/cli.git
cli/command/context: remove deprecated io/ioutil
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
43795ec8f7
commit
f28c063e2f
|
@ -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)
|
||||
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue