Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/go_modules/github.com/docker/do…
Browse files Browse the repository at this point in the history
…cker-24.0.7incompatible
  • Loading branch information
teem0n authored Dec 6, 2023
2 parents eeb0991 + 4754a37 commit 8b1ab88
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker-jepsen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- cron: '0 0 * * *'

env:
GO_VERSION: 1.20.5
GO_VERSION: 1.21.3

jobs:
test:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-tests-8.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ master ]

env:
GO_VERSION: 1.20.5
GO_VERSION: 1.21.3

jobs:
buildimages:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ master ]

env:
GO_VERSION: 1.20.5
GO_VERSION: 1.21.3

jobs:
buildimages:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
branches: [ master ]

env:
GO_VERSION: 1.20.5
GO_VERSION: 1.21.3

jobs:
unittest:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/...
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/yandex/mysync

go 1.18
go 1.21

require (
github.com/cenkalti/backoff/v4 v4.2.1
Expand Down
7 changes: 3 additions & 4 deletions tests/testutil/docker_composer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
}
Expand All @@ -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
}
Expand Down

0 comments on commit 8b1ab88

Please sign in to comment.