Merge pull request #175 from thaJeztah/18.09_backport_fix_testrunbindmounts
[18.09 backport] Windows (pre RS5) disableTestRunBindMounts Upstream-commit: 1782e74e54d32a709140cf88545046bc5478e208 Component: engine
This commit is contained in:
@ -1885,6 +1885,11 @@ func (s *DockerSuite) TestRunBindMounts(c *check.C) {
|
||||
testRequires(c, DaemonIsLinux, NotUserNamespace)
|
||||
}
|
||||
|
||||
if testEnv.OSType == "windows" {
|
||||
// Disabled prior to RS5 due to how volumes are mapped
|
||||
testRequires(c, DaemonIsWindowsAtLeastBuild(17763))
|
||||
}
|
||||
|
||||
prefix, _ := getPrefixAndSlashFromDaemonPlatform()
|
||||
|
||||
tmpDir, err := ioutil.TempDir("", "docker-test-container")
|
||||
@ -1896,7 +1901,7 @@ func (s *DockerSuite) TestRunBindMounts(c *check.C) {
|
||||
writeFile(path.Join(tmpDir, "touch-me"), "", c)
|
||||
|
||||
// Test reading from a read-only bind mount
|
||||
out, _ := dockerCmd(c, "run", "-v", fmt.Sprintf("%s:%s/tmp:ro", tmpDir, prefix), "busybox", "ls", prefix+"/tmp")
|
||||
out, _ := dockerCmd(c, "run", "-v", fmt.Sprintf("%s:%s/tmpx:ro", tmpDir, prefix), "busybox", "ls", prefix+"/tmpx")
|
||||
if !strings.Contains(out, "touch-me") {
|
||||
c.Fatal("Container failed to read from bind mount")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user