mirror of https://github.com/golang/go.git
net: skip test in full test mode when running in a container
Fixes #25546 Change-Id: I00457b370ed6dcd7ee9efcae3fd914e4c384b12c Reviewed-on: https://go-review.googlesource.com/114475 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Bonventre <andybons@golang.org>
This commit is contained in:
parent
8e5cb0da1b
commit
67b0bd7caf
|
|
@ -11,6 +11,7 @@ import (
|
|||
"os"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
|
@ -62,6 +63,9 @@ func TestPointToPointInterface(t *testing.T) {
|
|||
t.Skipf("test requires external command: %v", err)
|
||||
}
|
||||
if err := ti.setup(); err != nil {
|
||||
if e := err.Error(); strings.Contains(e, "No such device") && strings.Contains(e, "gre0") {
|
||||
t.Skip("skipping test; no gre0 device. likely running in container?")
|
||||
}
|
||||
t.Fatal(err)
|
||||
} else {
|
||||
time.Sleep(3 * time.Millisecond)
|
||||
|
|
|
|||
Loading…
Reference in New Issue