mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
syscall: skip a couple tests when running under Kubernetes
Update #12815 Change-Id: I3bf6de74bc8ab07000fe9a4308299839ef20632f Reviewed-on: https://go-review.googlesource.com/15283 Reviewed-by: Evan Brown <evanbrown@google.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
4c2a4004bd
commit
f35310edff
1 changed files with 7 additions and 0 deletions
|
|
@ -29,6 +29,13 @@ func whoamiCmd(t *testing.T, uid, gid int, setgroups bool) *exec.Cmd {
|
|||
t.Skip("kernel prohibits user namespace in unprivileged process")
|
||||
}
|
||||
}
|
||||
// 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")
|
||||
}
|
||||
cmd := exec.Command("whoami")
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{
|
||||
Cloneflags: syscall.CLONE_NEWUSER,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue