diff --git a/go.mod b/go.mod index 83bc6693..c9b46f24 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.19 require ( github.com/Masterminds/semver/v3 v3.2.0 github.com/docker/distribution v2.8.1+incompatible - github.com/docker/docker v20.10.23+incompatible + github.com/docker/docker v23.0.1+incompatible github.com/docker/go-units v0.5.0 github.com/gin-gonic/gin v1.9.0 github.com/go-vela/sdk-go v0.17.1-0.20230224164256-73b956037d5b diff --git a/go.sum b/go.sum index 9f4a5a12..9de30a67 100644 --- a/go.sum +++ b/go.sum @@ -98,8 +98,8 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/r github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.23+incompatible h1:1ZQUUYAdh+oylOT85aA2ZcfRp22jmLhoaEcVEfK8dyA= -github.com/docker/docker v20.10.23+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v23.0.1+incompatible h1:vjgvJZxprTTE1A37nm+CLNAdwu6xZekyoiVlUZEINcY= +github.com/docker/docker v23.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= diff --git a/mock/docker/container.go b/mock/docker/container.go index a39cf3f3..99a79246 100644 --- a/mock/docker/container.go +++ b/mock/docker/container.go @@ -357,7 +357,7 @@ func (c *ContainerService) ContainerResize(ctx context.Context, ctn string, opti // a mocked call to restart a Docker container. // // https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.ContainerRestart -func (c *ContainerService) ContainerRestart(ctx context.Context, ctn string, timeout *time.Duration) error { +func (c *ContainerService) ContainerRestart(ctx context.Context, ctn string, options container.StopOptions) error { return nil } @@ -403,7 +403,7 @@ func (c *ContainerService) ContainerStats(ctx context.Context, ctn string, strea // a mocked call to stop a Docker container. // // https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.ContainerStop -func (c *ContainerService) ContainerStop(ctx context.Context, ctn string, timeout *time.Duration) error { +func (c *ContainerService) ContainerStop(ctx context.Context, ctn string, options container.StopOptions) error { // verify a container was provided if len(ctn) == 0 { return errors.New("no container provided") diff --git a/mock/docker/system.go b/mock/docker/system.go index 850f10fb..1c2ce41d 100644 --- a/mock/docker/system.go +++ b/mock/docker/system.go @@ -22,7 +22,7 @@ type SystemService struct{} // from the Docker daemon. // // https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.DiskUsage -func (s *SystemService) DiskUsage(ctx context.Context) (types.DiskUsage, error) { +func (s *SystemService) DiskUsage(ctx context.Context, options types.DiskUsageOptions) (types.DiskUsage, error) { return types.DiskUsage{}, nil } diff --git a/mock/docker/volume.go b/mock/docker/volume.go index 952471d6..28273022 100644 --- a/mock/docker/volume.go +++ b/mock/docker/volume.go @@ -14,6 +14,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" + "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/api/types/volume" "github.com/docker/docker/client" "github.com/docker/docker/errdefs" @@ -174,6 +175,14 @@ func (v *VolumeService) VolumesPrune(ctx context.Context, pruneFilter filters.Ar return types.VolumesPruneReport{}, nil } +// VolumeUpdate is a helper function to simulate +// a mocked call to update a Docker volume. +// +// https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.VolumeUpdate +func (v *VolumeService) VolumeUpdate(ctx context.Context, volumeID string, version swarm.Version, options volume.UpdateOptions) error { + return nil +} + // WARNING: DO NOT REMOVE THIS UNDER ANY CIRCUMSTANCES // // This line serves as a quick and efficient way to ensure that our