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

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 <ahmetalpbalkan@gmail.com>
This commit is contained in:
Ahmet Alp Balkan 2015-02-20 00:58:44 -08:00
parent a78ce5c228
commit 6062838756

View file

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