Skip to content

Commit

Permalink
Update Docker.ContainerStop() call after docker library update
Browse files Browse the repository at this point in the history
  • Loading branch information
KrKOo committed Jan 20, 2024
1 parent fc1ef4b commit c4c745b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/funnel_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit c4c745b

Please sign in to comment.