mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-01-08 07:11:53 +00:00
Use Go's -short flag as a way to avoid running integration tests.
Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
16
test/library/skip.go
Normal file
16
test/library/skip.go
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
Copyright 2020 VMware, Inc.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package library
|
||||
|
||||
import "testing"
|
||||
|
||||
// SkipUnlessIntegration skips the current test if `-short` has been passed to `go test`.
|
||||
func SkipUnlessIntegration(t *testing.T) {
|
||||
t.Helper()
|
||||
if testing.Short() {
|
||||
t.Skip("skipping integration test because of '-short' flag")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user