diff --git a/.github/workflows/docker-jepsen.yml b/.github/workflows/docker-jepsen.yml index 94f161b0..33e02075 100644 --- a/.github/workflows/docker-jepsen.yml +++ b/.github/workflows/docker-jepsen.yml @@ -5,7 +5,7 @@ on: - cron: '0 0 * * *' env: - GO_VERSION: 1.20.5 + GO_VERSION: 1.21.3 jobs: test: diff --git a/.github/workflows/docker-tests-8.0.yml b/.github/workflows/docker-tests-8.0.yml index 1dc20e6d..c5dedb38 100644 --- a/.github/workflows/docker-tests-8.0.yml +++ b/.github/workflows/docker-tests-8.0.yml @@ -7,7 +7,7 @@ on: branches: [ master ] env: - GO_VERSION: 1.20.5 + GO_VERSION: 1.21.3 jobs: buildimages: diff --git a/.github/workflows/docker-tests.yml b/.github/workflows/docker-tests.yml index 4786da12..eff58baf 100644 --- a/.github/workflows/docker-tests.yml +++ b/.github/workflows/docker-tests.yml @@ -7,7 +7,7 @@ on: branches: [ master ] env: - GO_VERSION: 1.20.5 + GO_VERSION: 1.21.3 jobs: buildimages: diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 548defc4..eedffe8d 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.20.5 + go-version: 1.21.3 - uses: actions/checkout@v3 - name: golangci-lint uses: golangci/golangci-lint-action@v3 diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 0e33c503..43191724 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -8,7 +8,7 @@ on: branches: [ master ] env: - GO_VERSION: 1.20.5 + GO_VERSION: 1.21.3 jobs: unittest: diff --git a/Makefile b/Makefile index cd44feaa..606b6e49 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ format: goimports -w `find . -name '*.go'` lint: - docker run --rm -v ${CURDIR}:/app -w /app golangci/golangci-lint:v1.50.1 golangci-lint run -v + docker run --rm -v ${CURDIR}:/app -w /app golangci/golangci-lint:v1.55 golangci-lint run -v unittests: go test ./cmd/... ./internal/... diff --git a/go.mod b/go.mod index 89926fab..bd2314ea 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/yandex/mysync -go 1.18 +go 1.21 require ( github.com/cenkalti/backoff/v4 v4.2.1 diff --git a/tests/testutil/docker_composer.go b/tests/testutil/docker_composer.go index 5c05d224..4c418f6b 100644 --- a/tests/testutil/docker_composer.go +++ b/tests/testutil/docker_composer.go @@ -15,12 +15,12 @@ import ( "time" "github.com/docker/docker/api/types" + "github.com/docker/docker/api/types/container" "github.com/docker/docker/client" ) const defaultDockerTimeout = 30 * time.Second const defaultDockerComposeTimeout = 90 * time.Second -const defaultContainerStopTimeout = 30 * time.Second const shell = "/bin/bash" // Composer manipulate images/vm's during integration tests @@ -286,7 +286,7 @@ func (dc *DockerComposer) Start(service string) error { } ctx, cancel := context.WithTimeout(context.Background(), defaultDockerTimeout) defer cancel() - err := dc.api.ContainerRestart(ctx, cont.ID, nil) + err := dc.api.ContainerRestart(ctx, cont.ID, container.StopOptions{}) if err != nil { return err } @@ -303,8 +303,7 @@ func (dc *DockerComposer) Stop(service string) error { } ctx, cancel := context.WithTimeout(context.Background(), defaultDockerTimeout) defer cancel() - stopTimeout := defaultContainerStopTimeout - err := dc.api.ContainerStop(ctx, cont.ID, &stopTimeout) + err := dc.api.ContainerStop(ctx, cont.ID, container.StopOptions{}) dc.stopped[service] = true return err }