Skip to content

Commit

Permalink
👷 Disable go test timeout. Rely on GitHub actions timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
elgohr committed Dec 25, 2023
1 parent 35a16a4 commit 979261b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ jobs:
run: |
export DOCKER_HOST="unix://${{ matrix.runtime }}"
echo "Using ${DOCKER_HOST}"
go test -race -timeout 30m -coverprofile=coverage.txt -covermode=atomic ./...
go test -race -timeout 0 -coverprofile=coverage.txt -covermode=atomic ./...
- name: Coverage
uses: codecov/codecov-action@v3
with:
file: coverage.txt

linter:
runs-on: ubuntu-latest
permissions:
Expand All @@ -32,12 +33,14 @@ jobs:
with:
go-version: '^1.21'
- uses: golangci/golangci-lint-action@v3

advanced-security:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
Expand All @@ -48,6 +51,7 @@ jobs:
languages: 'go'
- uses: github/codeql-action/autobuild@v3
- uses: github/codeql-action/analyze@v3

release:
needs:
- test
Expand Down
6 changes: 3 additions & 3 deletions localstack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ func TestWithTimeoutOnStartup(t *testing.T) {
containers, err := cli.ContainerList(ctx, types.ContainerListOptions{})
require.NoError(t, err)
for _, c := range containers {
if c.Image == "go-localstack" {
t.Fatal("image is still running but should be terminated")
if strings.Contains(c.Image, "go-localstack") {
t.Fatalf("%s is still running but should be terminated", c.Image)
}
}
}
Expand All @@ -116,7 +116,7 @@ func TestWithTimeoutAfterStartup(t *testing.T) {
containers, err := cli.ContainerList(ctx, types.ContainerListOptions{})
require.NoError(t, err)
for _, c := range containers {
if c.Image == "go-localstack" {
if strings.Contains(c.Image, "go-localstack") {
return false
}
}
Expand Down

0 comments on commit 979261b

Please sign in to comment.