Merge pull request #964 from zhaoleidd/test_fix

UNITTEST: Bypass userns test on platform without userns support
This commit is contained in:
Qiang Huang 2016-07-26 11:30:17 +08:00 committed by GitHub
commit 8033a83975
1 changed files with 3 additions and 0 deletions

View File

@ -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(