Sfoglia il codice sorgente

Update test for /sys mounting

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Michael Crosby 10 anni fa
parent
commit
677d76cd4a
1 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. 3 3
      integration-cli/docker_cli_run_test.go

+ 3 - 3
integration-cli/docker_cli_run_test.go

@@ -3213,8 +3213,8 @@ func (s *DockerSuite) TestMountIntoProc(c *check.C) {
 func (s *DockerSuite) TestMountIntoSys(c *check.C) {
 func (s *DockerSuite) TestMountIntoSys(c *check.C) {
 	testRequires(c, NativeExecDriver)
 	testRequires(c, NativeExecDriver)
 	defer deleteAllContainers()
 	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")
 	}
 	}
 }
 }