Skip to content

Commit 403044c

Browse files
authored
Revert "chore: upgrade to docker v23 and add new mocked funcs (#433)" (#435)
This reverts commit 3a4c3a2.
1 parent 3a4c3a2 commit 403044c

File tree

5 files changed

+6
-15
lines changed

5 files changed

+6
-15
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.19
55
require (
66
github.com/Masterminds/semver/v3 v3.2.0
77
github.com/docker/distribution v2.8.1+incompatible
8-
github.com/docker/docker v23.0.1+incompatible
8+
github.com/docker/docker v20.10.23+incompatible
99
github.com/docker/go-units v0.5.0
1010
github.com/gin-gonic/gin v1.9.0
1111
github.com/go-vela/sdk-go v0.17.1-0.20230224164256-73b956037d5b

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/r
9898
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
9999
github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68=
100100
github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
101-
github.com/docker/docker v23.0.1+incompatible h1:vjgvJZxprTTE1A37nm+CLNAdwu6xZekyoiVlUZEINcY=
102-
github.com/docker/docker v23.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
101+
github.com/docker/docker v20.10.23+incompatible h1:1ZQUUYAdh+oylOT85aA2ZcfRp22jmLhoaEcVEfK8dyA=
102+
github.com/docker/docker v20.10.23+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
103103
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
104104
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
105105
github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=

mock/docker/container.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ func (c *ContainerService) ContainerResize(ctx context.Context, ctn string, opti
357357
// a mocked call to restart a Docker container.
358358
//
359359
// https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.ContainerRestart
360-
func (c *ContainerService) ContainerRestart(ctx context.Context, ctn string, options container.StopOptions) error {
360+
func (c *ContainerService) ContainerRestart(ctx context.Context, ctn string, timeout *time.Duration) error {
361361
return nil
362362
}
363363

@@ -403,7 +403,7 @@ func (c *ContainerService) ContainerStats(ctx context.Context, ctn string, strea
403403
// a mocked call to stop a Docker container.
404404
//
405405
// https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.ContainerStop
406-
func (c *ContainerService) ContainerStop(ctx context.Context, ctn string, options container.StopOptions) error {
406+
func (c *ContainerService) ContainerStop(ctx context.Context, ctn string, timeout *time.Duration) error {
407407
// verify a container was provided
408408
if len(ctn) == 0 {
409409
return errors.New("no container provided")

mock/docker/system.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type SystemService struct{}
2222
// from the Docker daemon.
2323
//
2424
// https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.DiskUsage
25-
func (s *SystemService) DiskUsage(ctx context.Context, options types.DiskUsageOptions) (types.DiskUsage, error) {
25+
func (s *SystemService) DiskUsage(ctx context.Context) (types.DiskUsage, error) {
2626
return types.DiskUsage{}, nil
2727
}
2828

mock/docker/volume.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414

1515
"github.com/docker/docker/api/types"
1616
"github.com/docker/docker/api/types/filters"
17-
"github.com/docker/docker/api/types/swarm"
1817
"github.com/docker/docker/api/types/volume"
1918
"github.com/docker/docker/client"
2019
"github.com/docker/docker/errdefs"
@@ -175,14 +174,6 @@ func (v *VolumeService) VolumesPrune(ctx context.Context, pruneFilter filters.Ar
175174
return types.VolumesPruneReport{}, nil
176175
}
177176

178-
// VolumeUpdate is a helper function to simulate
179-
// a mocked call to update a Docker volume.
180-
//
181-
// https://pkg.go.dev/github.com/docker/docker/client?tab=doc#Client.VolumeUpdate
182-
func (v *VolumeService) VolumeUpdate(ctx context.Context, volumeID string, version swarm.Version, options volume.UpdateOptions) error {
183-
return nil
184-
}
185-
186177
// WARNING: DO NOT REMOVE THIS UNDER ANY CIRCUMSTANCES
187178
//
188179
// This line serves as a quick and efficient way to ensure that our

0 commit comments

Comments
 (0)