package testutils import ( "os/exec" "testing" ) // SkipIfDockerUnavailable skips the test if Docker is not available (for testcontainers). // Also skips when testing.Short() is true. func SkipIfDockerUnavailable(t *testing.T) { t.Helper() if testing.Short() { t.Skip("Skipping database test in short mode") } if _, err := exec.LookPath("docker"); err != nil { t.Skip("Docker not available, skipping test requiring testcontainers") } }