From c4c745b361bef04c3bc6af4a55bbc69d2f513d77 Mon Sep 17 00:00:00 2001 From: KrKOo Date: Sat, 20 Jan 2024 00:54:17 +0100 Subject: [PATCH] Update Docker.ContainerStop() call after docker library update --- tests/funnel_utils.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/funnel_utils.go b/tests/funnel_utils.go index fe419f0f..fe3a9e1f 100644 --- a/tests/funnel_utils.go +++ b/tests/funnel_utils.go @@ -16,6 +16,7 @@ import ( "time" dockerTypes "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/container" dockerFilters "github.com/docker/docker/api/types/filters" docker "github.com/docker/docker/client" runlib "github.com/ohsu-comp-bio/funnel/cmd/run" @@ -424,9 +425,14 @@ func (f *Funnel) findTestServerContainers() []string { } func (f *Funnel) killTestServerContainers(ids []string) { - timeout := 10 * time.Second + timeout := 10 + + options := container.StopOptions{ + Timeout: &timeout, + } + for _, n := range ids { - err := f.Docker.ContainerStop(context.Background(), strings.TrimPrefix(n, "/"), &timeout) + err := f.Docker.ContainerStop(context.Background(), strings.TrimPrefix(n, "/"), options) if err != nil { panic(err) }