*: -short should skip integration tests

This commit is contained in:
diamondburned 2023-06-07 18:02:48 -07:00
parent 13a6bf10cc
commit 176d9921c7
No known key found for this signature in database
GPG Key ID: D78C4471CE776659
1 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,4 @@
//go:build !uintonly
// +build !uintonly
package testenv
@ -29,10 +30,15 @@ var (
)
func Must(t *testing.T) Env {
if testing.Short() {
t.Skip("skipping integration test")
}
e, err := GetEnv()
if err != nil {
t.Skip("integration test variables missing")
}
return e
}