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

Merge pull request #38908 from Microsoft/jjh/testrunbindmounts

Windows (pre RS5) disableTestRunBindMounts
This commit is contained in:
Sebastiaan van Stijn 2019-03-20 08:31:53 +01:00 committed by GitHub
commit 6dfd5bd74f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1885,6 +1885,11 @@ func (s *DockerSuite) TestRunBindMounts(c *check.C) {
testRequires(c, DaemonIsLinux, NotUserNamespace) testRequires(c, DaemonIsLinux, NotUserNamespace)
} }
if testEnv.OSType == "windows" {
// Disabled prior to RS5 due to how volumes are mapped
testRequires(c, DaemonIsWindowsAtLeastBuild(17763))
}
prefix, _ := getPrefixAndSlashFromDaemonPlatform() prefix, _ := getPrefixAndSlashFromDaemonPlatform()
tmpDir, err := ioutil.TempDir("", "docker-test-container") 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) writeFile(path.Join(tmpDir, "touch-me"), "", c)
// Test reading from a read-only bind mount // 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") { if !strings.Contains(out, "touch-me") {
c.Fatal("Container failed to read from bind mount") c.Fatal("Container failed to read from bind mount")
} }