Files
coder/testutil/ci.go
T
Ammar Bandukwala 24d8644c0b chore: de-flake TestWorkspaceAgent_Metadata (round 2) (#7039)
This time, we keep the timing / "racey" tests, but avoid running
them in the harsher CI conditions.
2023-04-06 21:10:13 +00:00

17 lines
209 B
Go

package testutil
import (
"flag"
"os"
)
func InCI() bool {
_, ok := os.LookupEnv("CI")
return ok
}
func InRaceMode() bool {
fl := flag.Lookup("race")
return fl != nil && fl.Value.String() == "true"
}