Skip datadog integratio on macos if colima fails to start, since colima appears to be flaky due to a code signing error

This commit is contained in:
David Dworken
2023-09-08 19:27:16 -07:00
parent 084af932ea
commit 27d5c59263
2 changed files with 9 additions and 2 deletions

View File

@ -58,7 +58,12 @@ func TestMain(m *testing.M) {
if _, has_dd_api_key := os.LookupEnv("DD_API_KEY"); testutils.IsGithubAction() && has_dd_api_key {
ddStats, err := statsd.New("localhost:8125")
if err != nil {
panic(fmt.Errorf("Failed to start DataDog statsd: %w\n", err))
err := fmt.Errorf("Failed to start DataDog statsd: %w\n", err)
if runtime.GOOS == "darwin" {
fmt.Printf("%v", err)
} else {
panic(err)
}
}
GLOBAL_STATSD = ddStats
}