1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #14380 from sunyuan3/TestRunCapAddCHOWN

add TestRunCapAddCHOWN test case
This commit is contained in:
Arnaud Porterie 2015-07-07 12:36:14 -07:00
commit e3966c1031

View file

@ -3220,3 +3220,15 @@ func (s *DockerSuite) TestRunContainerNetModeWithExposePort(c *check.C) {
}
}
func (s *DockerSuite) TestRunCapAddCHOWN(c *check.C) {
cmd := exec.Command(dockerBinary, "run", "--cap-drop=ALL", "--cap-add=CHOWN", "busybox", "sh", "-c", "adduser -D -H newuser && chown newuser /home && echo ok")
out, _, err := runCommandWithOutput(cmd)
if err != nil {
c.Fatal(err, out)
}
if actual := strings.Trim(out, "\r\n"); actual != "ok" {
c.Fatalf("expected output ok received %s", actual)
}
}