Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Upgrade dependencies to address dependabot issue #16

Merged
merged 2 commits into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: 1.20.x
- name: Retrieve golangci-lint version
Expand All @@ -40,20 +40,20 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [1.18.x, 1.19.x, 1.20.x, tip]
go-version: [1.19.x, 1.20.x, tip]
platform: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go ${{ matrix.go-version }}
if: matrix.go-version != 'tip'
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Install Go stable
if: matrix.go-version == 'tip'
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: 1.x
- name: Install Go tip
Expand All @@ -78,7 +78,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version: 1.20.x
- name: Check build
Expand Down
10 changes: 6 additions & 4 deletions containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ package docker
import (
"bytes"
"context"
"time"

"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/client"
)

Expand Down Expand Up @@ -37,9 +36,12 @@ func (d *Containers) Start(containerID string) error {
// Stop works as Docker stop command
func (d *Containers) Stop(containerID string) error {
// TODO: Add timeout option support
timeout := 0 * time.Second
timeout := 0
options := container.StopOptions{
Timeout: &timeout,
}

return d.Client.ContainerStop(context.Background(), containerID, &timeout)
return d.Client.ContainerStop(context.Background(), containerID, options)
}

// Pause works as Docker pause command
Expand Down
40 changes: 21 additions & 19 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,42 @@ module github.com/grafana/xk6-docker
go 1.19

require (
github.com/docker/docker v20.10.24+incompatible
go.k6.io/k6 v0.43.1
github.com/docker/docker v23.0.6+incompatible
go.k6.io/k6 v0.45.1
)

require (
github.com/Microsoft/go-winio v0.4.16 // indirect
github.com/dlclark/regexp2 v1.7.0 // indirect
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/dlclark/regexp2 v1.10.0 // indirect
github.com/docker/distribution v2.8.2+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/go-units v0.4.0 // indirect
github.com/dop251/goja v0.0.0-20230128084908-78b980256d04 // indirect
github.com/fatih/color v1.13.0 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dop251/goja v0.0.0-20230707174833-636fdf960de1 // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/go-sourcemap/sourcemap v2.1.4-0.20211119122758-180fcef48034+incompatible // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/google/pprof v0.0.0-20230728192033-2ba5b33183c6 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/mstoykov/atlas v0.0.0-20220808085829-90340e9998bd // indirect
github.com/mstoykov/atlas v0.0.0-20220811071828-388f114305dd // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.27.6 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.1 // indirect
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/serenize/snaker v0.0.0-20201027110005-a7ad2135616e // indirect
github.com/sirupsen/logrus v1.9.0 // indirect
github.com/spf13/afero v1.1.2 // indirect
golang.org/x/net v0.8.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/time v0.0.0-20220922220347-f3bd1da661af // indirect
gopkg.in/guregu/null.v3 v3.3.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spf13/afero v1.9.5 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.13.0 // indirect
golang.org/x/sys v0.10.0 // indirect
golang.org/x/text v0.11.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.11.1 // indirect
gopkg.in/guregu/null.v3 v3.5.0 // indirect
gotest.tools/v3 v3.0.3 // indirect
)
Loading