Skip to content

[Bug]: github.com/testcontainers/testcontainers-go.SkipIfProviderIsNotHealthy panics on GHA macos-latest runnersΒ #2859

Open
@RomainMuller

Description

Testcontainers version

0.34.0

Using the latest Testcontainers version?

Yes

Host OS

macOS

Host arch

x86, ARM64

Go version

1.22 / 1.23

Docker version

Docker is not available on macos-latest GitHub Actions runners.

Docker info

Docker is not available on macos-latest GitHub Actions runners.

What happened?

Attempting to skip tests on runners where Docker is not usable using github.com/testcontainers/testcontainers-go.SkipIfProviderIsNotHealthy; tests still fail on an unconditional panic on macos-latest runners in GitHub Actions.

Relevant log output

panic: rootless Docker not found [recovered]
	panic: rootless Docker not found

goroutine 53 [running]:
testing.tRunner.func1.2({0x102f964a0, 0x140001285d0})
	/Users/runner/hostedtoolcache/go/1.22.8/arm64/src/testing/testing.go:1631 +0x1c4
testing.tRunner.func1()
	/Users/runner/hostedtoolcache/go/1.22.8/arm64/src/testing/testing.go:1634 +0x33c
panic({0x102f964a0?, 0x140001285d0?})
	/Users/runner/hostedtoolcache/go/1.22.8/arm64/src/runtime/panic.go:770 +0x124
github.com/testcontainers/testcontainers-go/internal/core.MustExtractDockerHost.func1()
	/Users/runner/go/pkg/mod/github.com/testcontainers/testcontainers-go@v0.34.0/internal/core/docker_host.go:91 +0x78
sync.(*Once).doSlow(0x0?, 0x0?)
	/Users/runner/hostedtoolcache/go/1.22.8/arm64/src/sync/once.go:74 +0x100
sync.(*Once).Do(...)
	/Users/runner/hostedtoolcache/go/1.22.8/arm64/src/sync/once.go:65
github.com/testcontainers/testcontainers-go/internal/core.MustExtractDockerHost({0x103092ec0?, 0x1035f0f80?})
	/Users/runner/go/pkg/mod/github.com/testcontainers/testcontainers-go@v0.34.0/internal/core/docker_host.go:88 +0x5c
github.com/testcontainers/testcontainers-go/internal/core.NewClient({0x103092ec0, 0x1035f0f80}, {0x0, 0x0, 0x0?})
	/Users/runner/go/pkg/mod/github.com/testcontainers/testcontainers-go@v0.34.0/internal/core/client.go:17 +0x9c
github.com/testcontainers/testcontainers-go.NewDockerClientWithOpts({0x103092ec0, 0x1035f0f80}, {0x0, 0x0, 0x0})
	/Users/runner/go/pkg/mod/github.com/testcontainers/testcontainers-go@v0.34.0/docker_client.go:117 +0x4c
github.com/testcontainers/testcontainers-go.NewDockerProvider({0x14000a84c50, 0x1, 0x14000079bf8?})
	/Users/runner/go/pkg/mod/github.com/testcontainers/testcontainers-go@v0.34.0/provider.go:143 +0x10c
github.com/testcontainers/testcontainers-go.ProviderType.GetProvider(0x1, {0x0, 0x0, 0x10288cd40?})
	/Users/runner/go/pkg/mod/github.com/testcontainers/testcontainers-go@v0.34.0/provider.go:114 +0x394
github.com/testcontainers/testcontainers-go.SkipIfProviderIsNotHealthy(0x140007a6d00)
	/Users/runner/go/pkg/mod/github.com/testcontainers/testcontainers-go@v0.34.0/testing.go:24 +0x38
datadoghq.dev/orchestrion/_integration-tests/utils.SkipIfProviderIsNotHealthy(0x140007a6d00)
	/Users/runner/work/orchestrion/orchestrion/_integration-tests/utils/testcontainers.go:103 +0xf0
datadoghq.dev/orchestrion/_integration-tests/tests/vault.(*TestCase).Setup(0x14000a84ba0, 0x140007a6d00)
	/Users/runner/work/orchestrion/orchestrion/_integration-tests/tests/vault/vault.go:30 +0xac
datadoghq.dev/orchestrion/_integration-tests/utils.RunTest(0x140007a6d00, {0x103092ef8, 0x14000a84ba0})
	/Users/runner/work/orchestrion/orchestrion/_integration-tests/utils/suite.go:63 +0x188
datadoghq.dev/orchestrion/_integration-tests/tests/vault.TestIntegration_vault(0x140007a6d00)
	/Users/runner/work/orchestrion/orchestrion/_integration-tests/tests/vault/gen_test.go:18 +0x3c
testing.tRunner(0x140007a6d00, 0x103085a78)
	/Users/runner/hostedtoolcache/go/1.22.8/arm64/src/testing/testing.go:1689 +0xec
created by testing.(*T).Run in goroutine 1
	/Users/runner/hostedtoolcache/go/1.22.8/arm64/src/testing/testing.go:1742 +0x320

Additional information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugAn issue with the library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions