From 12614debc5c00a20b03436f49f6f60353bdba569 Mon Sep 17 00:00:00 2001 From: John Howard Date: Thu, 29 Oct 2015 15:51:04 -0700 Subject: [PATCH] Fix test file paths Signed-off-by: John Howard Upstream-commit: 1847641b7b6985e7fe06cb09adf5c9f6237b5931 Component: engine --- components/engine/integration-cli/docker_utils.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/components/engine/integration-cli/docker_utils.go b/components/engine/integration-cli/docker_utils.go index 188c821f32..5f9436c8fa 100644 --- a/components/engine/integration-cli/docker_utils.go +++ b/components/engine/integration-cli/docker_utils.go @@ -86,6 +86,15 @@ func init() { dockerBasePath = info.DockerRootDir volumesConfigPath = filepath.Join(dockerBasePath, "volumes") containerStoragePath = filepath.Join(dockerBasePath, "containers") + // Make sure in context of daemon, not the local platform. Note we can't + // use filepath.FromSlash or ToSlash here as they are a no-op on Unix. + if daemonPlatform == "windows" { + volumesConfigPath = strings.Replace(volumesConfigPath, `/`, `\`, -1) + containerStoragePath = strings.Replace(containerStoragePath, `/`, `\`, -1) + } else { + volumesConfigPath = strings.Replace(volumesConfigPath, `\`, `/`, -1) + containerStoragePath = strings.Replace(containerStoragePath, `\`, `/`, -1) + } } // Daemon represents a Docker daemon for the testing framework.