mirror of
https://github.com/docker/cli.git
synced 2026-08-30 18:14:19 -05:00
Update test for /sys mounting
Signed-off-by: Michael Crosby <crosbymichael@gmail.com> Upstream-commit: 677d76cd4aadf7514a3ba4e6761880fc3817f573 Component: engine
This commit is contained in:
@@ -3213,8 +3213,8 @@ func (s *DockerSuite) TestMountIntoProc(c *check.C) {
|
||||
func (s *DockerSuite) TestMountIntoSys(c *check.C) {
|
||||
testRequires(c, NativeExecDriver)
|
||||
defer deleteAllContainers()
|
||||
code, err := runCommand(exec.Command(dockerBinary, "run", "-v", "/sys/", "busybox", "true"))
|
||||
if err == nil || code == 0 {
|
||||
c.Fatal("container should not be able to mount into /sys")
|
||||
_, err := runCommand(exec.Command(dockerBinary, "run", "-v", "/sys/fs/cgroup", "busybox", "true"))
|
||||
if err != nil {
|
||||
c.Fatal("container should be able to mount into /sys/fs/cgroup")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user