internal/testenv: skip network tests only when -short is specified

Change-Id: I157879f5204d543eb3fc81c212d563b146473ba8
Reviewed-on: https://go-review.googlesource.com/11232
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
Andrew Gerrand 2015-06-18 17:33:29 +10:00
parent ee1ef8fe67
commit e6d2112ba9

View file

@ -86,5 +86,7 @@ func HasExternalNetwork() bool {
// external (non-localhost) networks.
// If not, MustHaveExternalNetwork calls t.Skip with an explanation.
func MustHaveExternalNetwork(t *testing.T) {
t.Skipf("skipping test: no external network in -short mode")
if testing.Short() {
t.Skipf("skipping test: no external network in -short mode")
}
}