Skip to content

Commit 2d47c9b

Browse files
authored
Merge pull request docker#5521 from thaJeztah/fix_test_args
cli/command/images: set cmd.Args to prevent test-failures
2 parents b64f265 + 839dbbc commit 2d47c9b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cli/command/image/load_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ func TestNewLoadCommandErrors(t *testing.T) {
2828
},
2929
{
3030
name: "input-to-terminal",
31+
args: []string{},
3132
isTerminalIn: true,
3233
expectedError: "requested load from stdin, but stdin is empty",
3334
},
3435
{
3536
name: "pull-error",
37+
args: []string{},
3638
expectedError: "something went wrong",
3739
imageLoadFunc: func(input io.Reader, options image.LoadOptions) (image.LoadResponse, error) {
3840
return image.LoadResponse{}, errors.Errorf("something went wrong")
@@ -71,12 +73,14 @@ func TestNewLoadCommandSuccess(t *testing.T) {
7173
}{
7274
{
7375
name: "simple",
76+
args: []string{},
7477
imageLoadFunc: func(input io.Reader, options image.LoadOptions) (image.LoadResponse, error) {
7578
return image.LoadResponse{Body: io.NopCloser(strings.NewReader("Success"))}, nil
7679
},
7780
},
7881
{
7982
name: "json",
83+
args: []string{},
8084
imageLoadFunc: func(input io.Reader, options image.LoadOptions) (image.LoadResponse, error) {
8185
json := "{\"ID\": \"1\"}"
8286
return image.LoadResponse{

0 commit comments

Comments
 (0)