Browse code

Merge pull request #38908 from Microsoft/jjh/testrunbindmounts

Windows (pre RS5) disableTestRunBindMounts

Sebastiaan van Stijn authored on 2019/03/20 16:31:53
Showing 1 changed files
... ...
@@ -1885,6 +1885,11 @@ func (s *DockerSuite) TestRunBindMounts(c *check.C) {
1885 1885
 		testRequires(c, DaemonIsLinux, NotUserNamespace)
1886 1886
 	}
1887 1887
 
1888
+	if testEnv.OSType == "windows" {
1889
+		// Disabled prior to RS5 due to how volumes are mapped
1890
+		testRequires(c,  DaemonIsWindowsAtLeastBuild(17763))
1891
+	}
1892
+
1888 1893
 	prefix, _ := getPrefixAndSlashFromDaemonPlatform()
1889 1894
 
1890 1895
 	tmpDir, err := ioutil.TempDir("", "docker-test-container")
... ...
@@ -1896,7 +1901,7 @@ func (s *DockerSuite) TestRunBindMounts(c *check.C) {
1896 1896
 	writeFile(path.Join(tmpDir, "touch-me"), "", c)
1897 1897
 
1898 1898
 	// Test reading from a read-only bind mount
1899
-	out, _ := dockerCmd(c, "run", "-v", fmt.Sprintf("%s:%s/tmp:ro", tmpDir, prefix), "busybox", "ls", prefix+"/tmp")
1899
+	out, _ := dockerCmd(c, "run", "-v", fmt.Sprintf("%s:%s/tmpx:ro", tmpDir, prefix), "busybox", "ls", prefix+"/tmpx")
1900 1900
 	if !strings.Contains(out, "touch-me") {
1901 1901
 		c.Fatal("Container failed to read from bind mount")
1902 1902
 	}