Windows (pre RS5) disableTestRunBindMounts

Signed-off-by: John Howard <jhoward@microsoft.com>
Signed-off-by: Tibor Vass <tibor@docker.com>
(cherry picked from commit 9d2e97ac6e20b17477947fc63e70299938606a38)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 91703956dffcf1d9c997aea83f9489a8c768412d
Component: engine
This commit is contained in:
John Howard
2019-03-19 13:27:51 -07:00
committed by Sebastiaan van Stijn
parent 8238697633
commit b95571e881

View File

@ -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")
}