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