diff options
Diffstat (limited to 'htesting')
-rw-r--r-- | htesting/test_helpers.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/htesting/test_helpers.go b/htesting/test_helpers.go index 84b36ee27..b584f4ca0 100644 --- a/htesting/test_helpers.go +++ b/htesting/test_helpers.go @@ -15,6 +15,7 @@ package htesting import ( "math/rand" + "os" "runtime" "strings" "time" @@ -86,3 +87,7 @@ func DiffStringSlices(slice1 []string, slice2 []string) []string { func DiffStrings(s1, s2 string) []string { return DiffStringSlices(strings.Fields(s1), strings.Fields(s2)) } + +func IsCI() bool { + return (os.Getenv("CI") != "" || os.Getenv("CI_LOCAL") != "") && os.Getenv("CIRCLE_BRANCH") == "" +} |