diff --git a/go.mod b/go.mod index 505cb80ae..98c925e28 100644 --- a/go.mod +++ b/go.mod @@ -42,7 +42,7 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/cpuguy83/dockercfg v0.3.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect - github.com/docker/docker v27.1.2+incompatible + github.com/docker/docker v27.1.2+incompatible // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect diff --git a/internal/testutils/test_container_utils.go b/internal/testutils/test_container_utils.go index 0a1c21c3d..bfa6307d8 100644 --- a/internal/testutils/test_container_utils.go +++ b/internal/testutils/test_container_utils.go @@ -10,7 +10,6 @@ import ( "os/exec" "testing" - "github.com/docker/docker/api/types/container" "github.com/kubeflow/model-registry/internal/ml_metadata/proto" testcontainers "github.com/testcontainers/testcontainers-go" "github.com/testcontainers/testcontainers-go/wait" @@ -86,8 +85,13 @@ func SetupMLMetadataTestContainer(t *testing.T) (*grpc.ClientConn, proto.Metadat Env: map[string]string{ "METADATA_STORE_SERVER_CONFIG_FILE": "/tmp/shared/conn_config.pb", }, - HostConfigModifier: func(hc *container.HostConfig) { - hc.Binds = []string{wd + ":/tmp/shared"} + Mounts: testcontainers.ContainerMounts{ + testcontainers.ContainerMount{ + Source: testcontainers.GenericBindMountSource{ // nolint keep deprecated method to avoid depending directly to docker api exposed by testcontainers' HostConfigModifier + HostPath: wd, + }, + Target: "/tmp/shared", + }, }, WaitingFor: wait.ForLog("Server listening on"), }