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
This commit is contained in:
Dale Hui
2025-08-19 14:03:55 -07:00
parent 0a17402aa2
commit f3e6b5a737
2 changed files with 4 additions and 5 deletions
+2 -3
View File
@@ -15,7 +15,6 @@ import (
"strings"
"testing"
dockertypes "github.com/docker/docker/api/types"
dockercontainer "github.com/docker/docker/api/types/container"
dockerimage "github.com/docker/docker/api/types/image"
dockernetwork "github.com/docker/docker/api/types/network"
@@ -64,7 +63,7 @@ type DockerContainer struct {
Cmd []string
ContainerId string
ContainerName string
ContainerJSON dockertypes.ContainerJSON
ContainerJSON dockercontainer.InspectResponse
containerInspected bool
keepForDebugging bool
}
@@ -269,7 +268,7 @@ func (d *DockerContainer) PortFor(cPort int) uint {
return port
}
func (d *DockerContainer) NetworkSettings() dockertypes.NetworkSettings {
func (d *DockerContainer) NetworkSettings() dockercontainer.NetworkSettings {
if d == nil {
panic("Cannot get network settings for a nil *DockerContainer")
}
+2 -2
View File
@@ -7,7 +7,7 @@ import (
"testing"
"time"
dockertypes "github.com/docker/docker/api/types"
dockercontainer "github.com/docker/docker/api/types/container"
)
type IsReadyFunc func(Instance) bool
@@ -98,6 +98,6 @@ type Instance interface {
Host() string
Port() uint
PortFor(int) uint
NetworkSettings() dockertypes.NetworkSettings
NetworkSettings() dockercontainer.NetworkSettings
KeepForDebugging()
}