mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
UNITTEST: Bypass userns test on platform without userns support
We should bypass userns test instead of show fail in platform without userns support. Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
This commit is contained in:
@@ -148,6 +148,9 @@ func TestValidateSecurityWithoutNEWNS(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestValidateUsernamespace(t *testing.T) {
|
||||
if _, err := os.Stat("/proc/self/ns/user"); os.IsNotExist(err) {
|
||||
t.Skip("userns is unsupported")
|
||||
}
|
||||
config := &configs.Config{
|
||||
Rootfs: "/var",
|
||||
Namespaces: configs.Namespaces(
|
||||
|
||||
Reference in New Issue
Block a user