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
7 changes: 3 additions & 4 deletions cli/command/checkpoint/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ package checkpoint
import (
"context"

"github.com/moby/moby/api/types/checkpoint"
"github.com/moby/moby/client"
)

type fakeClient struct {
client.Client
checkpointCreateFunc func(container string, options client.CheckpointCreateOptions) error
checkpointDeleteFunc func(container string, options client.CheckpointDeleteOptions) error
checkpointListFunc func(container string, options client.CheckpointListOptions) ([]checkpoint.Summary, error)
checkpointListFunc func(container string, options client.CheckpointListOptions) (client.CheckpointListResult, error)
}

func (cli *fakeClient) CheckpointCreate(_ context.Context, container string, options client.CheckpointCreateOptions) error {
Expand All @@ -28,9 +27,9 @@ func (cli *fakeClient) CheckpointDelete(_ context.Context, container string, opt
return nil
}

func (cli *fakeClient) CheckpointList(_ context.Context, container string, options client.CheckpointListOptions) ([]checkpoint.Summary, error) {
func (cli *fakeClient) CheckpointList(_ context.Context, container string, options client.CheckpointListOptions) (client.CheckpointListResult, error) {
if cli.checkpointListFunc != nil {
return cli.checkpointListFunc(container, options)
}
return []checkpoint.Summary{}, nil
return client.CheckpointListResult{}, nil
}
8 changes: 4 additions & 4 deletions cli/command/checkpoint/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ func newListCommand(dockerCLI command.Cli) *cobra.Command {
return cmd
}

func runList(ctx context.Context, dockerCli command.Cli, container string, opts listOptions) error {
checkpoints, err := dockerCli.Client().CheckpointList(ctx, container, client.CheckpointListOptions{
func runList(ctx context.Context, dockerCLI command.Cli, container string, opts listOptions) error {
checkpoints, err := dockerCLI.Client().CheckpointList(ctx, container, client.CheckpointListOptions{
CheckpointDir: opts.checkpointDir,
})
if err != nil {
return err
}

cpCtx := formatter.Context{
Output: dockerCli.Out(),
Output: dockerCLI.Out(),
Format: newFormat(formatter.TableFormatKey),
}
return formatWrite(cpCtx, checkpoints)
return formatWrite(cpCtx, checkpoints.Checkpoints)
}
14 changes: 8 additions & 6 deletions cli/command/checkpoint/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
func TestCheckpointListErrors(t *testing.T) {
testCases := []struct {
args []string
checkpointListFunc func(container string, options client.CheckpointListOptions) ([]checkpoint.Summary, error)
checkpointListFunc func(container string, options client.CheckpointListOptions) (client.CheckpointListResult, error)
expectedError string
}{
{
Expand All @@ -29,8 +29,8 @@ func TestCheckpointListErrors(t *testing.T) {
},
{
args: []string{"foo"},
checkpointListFunc: func(container string, options client.CheckpointListOptions) ([]checkpoint.Summary, error) {
return []checkpoint.Summary{}, errors.New("error getting checkpoints for container foo")
checkpointListFunc: func(container string, options client.CheckpointListOptions) (client.CheckpointListResult, error) {
return client.CheckpointListResult{}, errors.New("error getting checkpoints for container foo")
},
expectedError: "error getting checkpoints for container foo",
},
Expand All @@ -51,11 +51,13 @@ func TestCheckpointListErrors(t *testing.T) {
func TestCheckpointListWithOptions(t *testing.T) {
var containerID, checkpointDir string
cli := test.NewFakeCli(&fakeClient{
checkpointListFunc: func(container string, options client.CheckpointListOptions) ([]checkpoint.Summary, error) {
checkpointListFunc: func(container string, options client.CheckpointListOptions) (client.CheckpointListResult, error) {
containerID = container
checkpointDir = options.CheckpointDir
return []checkpoint.Summary{
{Name: "checkpoint-foo"},
return client.CheckpointListResult{
Checkpoints: []checkpoint.Summary{
{Name: "checkpoint-foo"},
},
}, nil
},
})
Expand Down
4 changes: 2 additions & 2 deletions vendor.mod
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ require (
github.com/google/uuid v1.6.0
github.com/mattn/go-runewidth v0.0.17
github.com/moby/go-archive v0.1.0
github.com/moby/moby/api v1.52.0-beta.1.0.20250923190348-e98849831fc4 // master
github.com/moby/moby/client v0.1.0-beta.0.0.20250923190348-e98849831fc4 // master
github.com/moby/moby/api v1.52.0-beta.1.0.20250929144731-9a97f59e6e2d // master
github.com/moby/moby/client v0.1.0-beta.0.0.20250929144731-9a97f59e6e2d // master
github.com/moby/patternmatcher v0.6.0
github.com/moby/swarmkit/v2 v2.1.0
github.com/moby/sys/atomicwriter v0.1.0
Expand Down
8 changes: 4 additions & 4 deletions vendor.sum
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3N
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
github.com/moby/go-archive v0.1.0 h1:Kk/5rdW/g+H8NHdJW2gsXyZ7UnzvJNOy6VKJqueWdcQ=
github.com/moby/go-archive v0.1.0/go.mod h1:G9B+YoujNohJmrIYFBpSd54GTUB4lt9S+xVQvsJyFuo=
github.com/moby/moby/api v1.52.0-beta.1.0.20250923190348-e98849831fc4 h1:nwVKjkAlQJp32lsr/TZ4dGUIkj+Ga6ftle+IVov9HYs=
github.com/moby/moby/api v1.52.0-beta.1.0.20250923190348-e98849831fc4/go.mod h1:8sBV0soUREiudtow4vqJGOxa4GyHI5vLQmvgKdHq5Ok=
github.com/moby/moby/client v0.1.0-beta.0.0.20250923190348-e98849831fc4 h1:fk0TcJJf4rrgD3I35xxPkb9R4S+KCToMNomydm/n2Pg=
github.com/moby/moby/client v0.1.0-beta.0.0.20250923190348-e98849831fc4/go.mod h1:o5CkJu0RlmnLWRZRaEd7fL6wo0Ggr8Hw/UvgqdIUBuI=
github.com/moby/moby/api v1.52.0-beta.1.0.20250929144731-9a97f59e6e2d h1:Aj0cTKlIyJh8hg5veIvuQEBQgFLtGJ5CJ9qqOV3TOpc=
github.com/moby/moby/api v1.52.0-beta.1.0.20250929144731-9a97f59e6e2d/go.mod h1:8sBV0soUREiudtow4vqJGOxa4GyHI5vLQmvgKdHq5Ok=
github.com/moby/moby/client v0.1.0-beta.0.0.20250929144731-9a97f59e6e2d h1:sDDi6SlfhB2ld+fsS3+6rWxLwUL4+++on61QPLAgvtY=
github.com/moby/moby/client v0.1.0-beta.0.0.20250929144731-9a97f59e6e2d/go.mod h1:o5CkJu0RlmnLWRZRaEd7fL6wo0Ggr8Hw/UvgqdIUBuI=
github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk=
github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc=
github.com/moby/swarmkit/v2 v2.1.0 h1:u+cJ5hSyF3HnzsyI+NtegYxdIPQIuibk7IbpXNxuISM=
Expand Down
8 changes: 7 additions & 1 deletion vendor/github.com/moby/moby/api/types/container/container.go

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

5 changes: 0 additions & 5 deletions vendor/github.com/moby/moby/api/types/registry/authconfig.go

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

16 changes: 16 additions & 0 deletions vendor/github.com/moby/moby/api/types/storage/root_f_s_storage.go

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

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

16 changes: 16 additions & 0 deletions vendor/github.com/moby/moby/api/types/storage/storage.go

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

4 changes: 1 addition & 3 deletions vendor/github.com/moby/moby/client/checkpoint.go

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

15 changes: 10 additions & 5 deletions vendor/github.com/moby/moby/client/checkpoint_list.go

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

20 changes: 19 additions & 1 deletion vendor/github.com/moby/moby/client/request.go

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

4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ github.com/moby/docker-image-spec/specs-go/v1
github.com/moby/go-archive
github.com/moby/go-archive/compression
github.com/moby/go-archive/tarheader
# github.com/moby/moby/api v1.52.0-beta.1.0.20250923190348-e98849831fc4
# github.com/moby/moby/api v1.52.0-beta.1.0.20250929144731-9a97f59e6e2d
## explicit; go 1.23.0
github.com/moby/moby/api/pkg/authconfig
github.com/moby/moby/api/pkg/progress
Expand All @@ -194,7 +194,7 @@ github.com/moby/moby/api/types/swarm
github.com/moby/moby/api/types/system
github.com/moby/moby/api/types/versions
github.com/moby/moby/api/types/volume
# github.com/moby/moby/client v0.1.0-beta.0.0.20250923190348-e98849831fc4
# github.com/moby/moby/client v0.1.0-beta.0.0.20250929144731-9a97f59e6e2d
## explicit; go 1.23.0
github.com/moby/moby/client
github.com/moby/moby/client/internal/timestamp
Expand Down
Loading