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:
+2
-3
@@ -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
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user