mirror of https://github.com/golang/go.git
syscall: remove use of IN_KUBERNETES in test
CL 201737 dropped the use of IN_KUBERNETES in tests, but it looks like it did not catch all occurrences. For #12815 For #34956 Change-Id: I72b89bfb850ba2890e9e6aa39b87167291ab7e9f Reviewed-on: https://go-review.googlesource.com/c/go/+/349789 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
b3c6de9dcd
commit
8699425b55
|
|
@ -111,14 +111,6 @@ func checkUserNS(t *testing.T) {
|
||||||
t.Skip("kernel doesn't support user namespaces")
|
t.Skip("kernel doesn't support user namespaces")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// When running under the Go continuous build, skip tests for
|
|
||||||
// now when under Kubernetes. (where things are root but not quite)
|
|
||||||
// Both of these are our own environment variables.
|
|
||||||
// See Issue 12815.
|
|
||||||
if os.Getenv("GO_BUILDER_NAME") != "" && os.Getenv("IN_KUBERNETES") == "1" {
|
|
||||||
t.Skip("skipping test on Kubernetes-based builders; see Issue 12815")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func whoamiCmd(t *testing.T, uid, gid int, setgroups bool) *exec.Cmd {
|
func whoamiCmd(t *testing.T, uid, gid int, setgroups bool) *exec.Cmd {
|
||||||
|
|
@ -201,14 +193,6 @@ func TestUnshare(t *testing.T) {
|
||||||
t.Skip("kernel prohibits unshare in unprivileged process, unless using user namespace")
|
t.Skip("kernel prohibits unshare in unprivileged process, unless using user namespace")
|
||||||
}
|
}
|
||||||
|
|
||||||
// When running under the Go continuous build, skip tests for
|
|
||||||
// now when under Kubernetes. (where things are root but not quite)
|
|
||||||
// Both of these are our own environment variables.
|
|
||||||
// See Issue 12815.
|
|
||||||
if os.Getenv("GO_BUILDER_NAME") != "" && os.Getenv("IN_KUBERNETES") == "1" {
|
|
||||||
t.Skip("skipping test on Kubernetes-based builders; see Issue 12815")
|
|
||||||
}
|
|
||||||
|
|
||||||
path := "/proc/net/dev"
|
path := "/proc/net/dev"
|
||||||
if _, err := os.Stat(path); err != nil {
|
if _, err := os.Stat(path); err != nil {
|
||||||
if os.IsNotExist(err) {
|
if os.IsNotExist(err) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue