Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions cli/command/container/exec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func TestRunExec(t *testing.T) {
testcases := []struct {
doc string
options ExecOptions
client fakeClient
client *fakeClient
expectedError string
expectedOut string
expectedErr string
Expand All @@ -172,12 +172,12 @@ func TestRunExec(t *testing.T) {
options: withDefaultOpts(ExecOptions{
Detach: true,
}),
client: fakeClient{execCreateFunc: execCreateWithID},
client: &fakeClient{execCreateFunc: execCreateWithID},
},
{
doc: "inspect error",
options: NewExecOptions(),
client: fakeClient{
client: &fakeClient{
inspectFunc: func(string) (types.ContainerJSON, error) {
return types.ContainerJSON{}, errors.New("failed inspect")
},
Expand All @@ -188,12 +188,13 @@ func TestRunExec(t *testing.T) {
doc: "missing exec ID",
options: NewExecOptions(),
expectedError: "exec ID empty",
client: &fakeClient{},
},
}

for _, testcase := range testcases {
t.Run(testcase.doc, func(t *testing.T) {
fakeCLI := test.NewFakeCli(&testcase.client)
fakeCLI := test.NewFakeCli(testcase.client)

err := RunExec(context.TODO(), fakeCLI, "thecontainer", testcase.options)
if testcase.expectedError != "" {
Expand Down
6 changes: 3 additions & 3 deletions cli/command/container/logs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestRunLogs(t *testing.T) {
testcases := []struct {
doc string
options *logsOptions
client fakeClient
client *fakeClient
expectedError string
expectedOut string
expectedErr string
Expand All @@ -39,13 +39,13 @@ func TestRunLogs(t *testing.T) {
doc: "successful logs",
expectedOut: "foo",
options: &logsOptions{},
client: fakeClient{logFunc: logFn("foo"), inspectFunc: inspectFn},
client: &fakeClient{logFunc: logFn("foo"), inspectFunc: inspectFn},
},
}

for _, testcase := range testcases {
t.Run(testcase.doc, func(t *testing.T) {
cli := test.NewFakeCli(&testcase.client)
cli := test.NewFakeCli(testcase.client)

err := runLogs(context.TODO(), cli, testcase.options)
if testcase.expectedError != "" {
Expand Down
4 changes: 2 additions & 2 deletions cli/command/registry/login_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ type fakeClient struct {
client.Client
}

func (c fakeClient) Info(context.Context) (system.Info, error) {
func (c *fakeClient) Info(context.Context) (system.Info, error) {
return system.Info{}, nil
}

func (c fakeClient) RegistryLogin(_ context.Context, auth registrytypes.AuthConfig) (registrytypes.AuthenticateOKBody, error) {
func (c *fakeClient) RegistryLogin(_ context.Context, auth registrytypes.AuthConfig) (registrytypes.AuthenticateOKBody, error) {
if auth.Password == expiredPassword {
return registrytypes.AuthenticateOKBody{}, errors.New("Invalid Username or Password")
}
Expand Down
2 changes: 1 addition & 1 deletion vendor.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ require (
github.com/creack/pty v1.1.21
github.com/distribution/reference v0.6.0
github.com/docker/distribution v2.8.3+incompatible
github.com/docker/docker v27.0.0-rc.2.0.20240620105908-1a1f3cff45ec+incompatible // master (v27.0-dev)
github.com/docker/docker v27.0.0-rc.2.0.20240620115510-018d93decfb5+incompatible // master (v27.0-dev)
github.com/docker/docker-credential-helpers v0.8.2
github.com/docker/go-connections v0.5.0
github.com/docker/go-units v0.5.0
Expand Down
4 changes: 2 additions & 2 deletions vendor.sum
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v27.0.0-rc.2.0.20240620105908-1a1f3cff45ec+incompatible h1:lN0HDqbNJr4SrjQyG7dko0wE6hxVSXXCNAw8DTO1Wm4=
github.com/docker/docker v27.0.0-rc.2.0.20240620105908-1a1f3cff45ec+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker v27.0.0-rc.2.0.20240620115510-018d93decfb5+incompatible h1:u7LstJjIAyW2WqbehgZbp/aJFlt0IP53bXOes3XajVY=
github.com/docker/docker v27.0.0-rc.2.0.20240620115510-018d93decfb5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo=
github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M=
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0=
Expand Down
28 changes: 25 additions & 3 deletions vendor/github.com/docker/docker/client/client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ github.com/docker/distribution/registry/client/transport
github.com/docker/distribution/registry/storage/cache
github.com/docker/distribution/registry/storage/cache/memory
github.com/docker/distribution/uuid
# github.com/docker/docker v27.0.0-rc.2.0.20240620105908-1a1f3cff45ec+incompatible
# github.com/docker/docker v27.0.0-rc.2.0.20240620115510-018d93decfb5+incompatible
## explicit
github.com/docker/docker/api
github.com/docker/docker/api/types
Expand Down