Commit 67b0bd7c authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

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: 's avatarAndrew Bonventre <andybons@golang.org>
parent 8e5cb0da
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment