From 606283875616bf71af4814fc47ee5c2ca7b729c6 Mon Sep 17 00:00:00 2001 From: Ahmet Alp Balkan Date: Fri, 20 Feb 2015 00:58:44 -0800 Subject: [PATCH] integ-cli: fix volume test by passing unix path as volume This fixes `TestVolumesNoCopyData` for test execution on windows by passing a unix-style path as volume even though it's running on windows. Signed-off-by: Ahmet Alp Balkan --- integration-cli/docker_cli_run_test.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/integration-cli/docker_cli_run_test.go b/integration-cli/docker_cli_run_test.go index d96d2192ad..f673d94185 100644 --- a/integration-cli/docker_cli_run_test.go +++ b/integration-cli/docker_cli_run_test.go @@ -2548,13 +2548,7 @@ func TestVolumesNoCopyData(t *testing.T) { t.Fatalf("Data was copied on volumes-from but shouldn't be:\n%q", out) } - tmpDir, err := ioutil.TempDir("", "docker_test_bind_mount_copy_data") - if err != nil { - t.Fatal(err) - } - - defer os.RemoveAll(tmpDir) - + tmpDir := randomUnixTmpDirPath("docker_test_bind_mount_copy_data") cmd = exec.Command(dockerBinary, "run", "-v", tmpDir+":/foo", "dataimage", "ls", "-lh", "/foo/bar") if out, _, err := runCommandWithOutput(cmd); err == nil || !strings.Contains(out, "No such file or directory") { t.Fatalf("Data was copied on bind-mount but shouldn't be:\n%q", out)