Skip to content

Commit

Permalink
Merge pull request moby#39876 from thaJeztah/TestCreateWithWorkdir_hy…
Browse files Browse the repository at this point in the history
…perv

integration-cli: update TestCreateWithWorkdir for Hyper-V isolation
  • Loading branch information
cpuguy83 authored Sep 20, 2019
2 parents 4e8cf9f + ac9ef84 commit 264e16c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions integration-cli/docker_cli_create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down

0 comments on commit 264e16c

Please sign in to comment.