Skip to content

Commit f3e6b5a

Browse files
committed
Replace usage of deprecated docker types
This is a backwards incompatible change, but there don't seem to be any public imports: https://pkg.go.dev/github.com/golang-migrate/migrate/v4@v4.18.3/testing?tab=importedby
1 parent 0a17402 commit f3e6b5a

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

testing/docker.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515
"strings"
1616
"testing"
1717

18-
dockertypes "github.com/docker/docker/api/types"
1918
dockercontainer "github.com/docker/docker/api/types/container"
2019
dockerimage "github.com/docker/docker/api/types/image"
2120
dockernetwork "github.com/docker/docker/api/types/network"
@@ -64,7 +63,7 @@ type DockerContainer struct {
6463
Cmd []string
6564
ContainerId string
6665
ContainerName string
67-
ContainerJSON dockertypes.ContainerJSON
66+
ContainerJSON dockercontainer.InspectResponse
6867
containerInspected bool
6968
keepForDebugging bool
7069
}
@@ -269,7 +268,7 @@ func (d *DockerContainer) PortFor(cPort int) uint {
269268
return port
270269
}
271270

272-
func (d *DockerContainer) NetworkSettings() dockertypes.NetworkSettings {
271+
func (d *DockerContainer) NetworkSettings() dockercontainer.NetworkSettings {
273272
if d == nil {
274273
panic("Cannot get network settings for a nil *DockerContainer")
275274
}

testing/testing.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"testing"
88
"time"
99

10-
dockertypes "github.com/docker/docker/api/types"
10+
dockercontainer "github.com/docker/docker/api/types/container"
1111
)
1212

1313
type IsReadyFunc func(Instance) bool
@@ -98,6 +98,6 @@ type Instance interface {
9898
Host() string
9999
Port() uint
100100
PortFor(int) uint
101-
NetworkSettings() dockertypes.NetworkSettings
101+
NetworkSettings() dockercontainer.NetworkSettings
102102
KeepForDebugging()
103103
}

0 commit comments

Comments
 (0)