mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
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.
This commit is contained in:
16
testutil/ci.go
Normal file
16
testutil/ci.go
Normal file
@ -0,0 +1,16 @@
|
||||
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"
|
||||
}
|
Reference in New Issue
Block a user