mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
This time, we keep the timing / "racey" tests, but avoid running them in the harsher CI conditions.
17 lines
209 B
Go
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"
|
|
}
|