package testutils import ( "fmt" "os" "testing" ) // TestMain skips the entire testutils test suite when integration prerequisites // (Docker daemon for testcontainers) are unavailable. The testutils package's own // tests exercise SetupTestDB and CleanupDatabaseWithOptions which require a real // Postgres container, so there is nothing meaningful to run without it. // // CI sets VEZA_SKIP_INTEGRATION=1 on runners without /var/run/docker.sock. func TestMain(m *testing.M) { if os.Getenv("VEZA_SKIP_INTEGRATION") == "1" { fmt.Println("testutils: skipping package (VEZA_SKIP_INTEGRATION=1)") os.Exit(0) } os.Exit(m.Run()) }