mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
ee1ef8fe67
commit
e6d2112ba9
1 changed files with 3 additions and 1 deletions
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue