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

Merge pull request #39876 from thaJeztah/TestCreateWithWorkdir_hyperv

integration-cli: update TestCreateWithWorkdir for Hyper-V isolation
This commit is contained in:
Brian Goff 2019-09-20 10:58:13 -07:00 committed by GitHub
commit 264e16c97b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -303,7 +303,15 @@ func (s *DockerSuite) TestCreateWithWorkdir(c *testing.T) {
// Windows does not create the workdir until the container is started
if testEnv.OSType == "windows" {
dockerCmd(c, "start", name)
if IsolationIsHyperv() {
// Hyper-V isolated containers do not allow file-operations on a
// running container. This test currently uses `docker cp` to verify
// that the WORKDIR was automatically created, which cannot be done
// while the container is running.
dockerCmd(c, "stop", name)
}
}
// TODO: rewrite this test to not use `docker cp` for verifying that the WORKDIR was created
dockerCmd(c, "cp", fmt.Sprintf("%s:%s", name, dir), prefix+slash+"tmp")
}