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 (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"io/ioutil"
|
"io"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/cli/internal/test"
|
"github.com/docker/cli/internal/test"
|
||||||
|
@ -37,7 +37,7 @@ func TestNetworkConnectErrors(t *testing.T) {
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
cmd.SetArgs(tc.args)
|
cmd.SetArgs(tc.args)
|
||||||
cmd.SetOut(ioutil.Discard)
|
cmd.SetOut(io.Discard)
|
||||||
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
|
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ package network
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"io/ioutil"
|
"io"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ func TestNetworkCreateErrors(t *testing.T) {
|
||||||
for key, value := range tc.flags {
|
for key, value := range tc.flags {
|
||||||
assert.NilError(t, cmd.Flags().Set(key, value))
|
assert.NilError(t, cmd.Flags().Set(key, value))
|
||||||
}
|
}
|
||||||
cmd.SetOut(ioutil.Discard)
|
cmd.SetOut(io.Discard)
|
||||||
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
|
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ package network
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"io/ioutil"
|
"io"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/cli/internal/test"
|
"github.com/docker/cli/internal/test"
|
||||||
|
@ -35,7 +35,7 @@ func TestNetworkDisconnectErrors(t *testing.T) {
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
cmd.SetArgs(tc.args)
|
cmd.SetArgs(tc.args)
|
||||||
cmd.SetOut(ioutil.Discard)
|
cmd.SetOut(io.Discard)
|
||||||
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
|
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ package network
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"io/ioutil"
|
"io"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/docker/cli/internal/test"
|
"github.com/docker/cli/internal/test"
|
||||||
|
@ -35,7 +35,7 @@ func TestNetworkListErrors(t *testing.T) {
|
||||||
networkListFunc: tc.networkListFunc,
|
networkListFunc: tc.networkListFunc,
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
cmd.SetOut(ioutil.Discard)
|
cmd.SetOut(io.Discard)
|
||||||
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
|
assert.ErrorContains(t, cmd.Execute(), tc.expectedError)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue