1
0
mirror of https://github.com/moby/moby.git synced 2025-07-30 18:23:29 +03:00

Add a getPrefixAndSlashFromDaemonPlatform …

… to limit code duplication in integration tests :P

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester
2016-02-03 15:16:00 +01:00
parent bc08203314
commit 382c96ee7b
6 changed files with 24 additions and 74 deletions

View File

@ -429,12 +429,8 @@ func (s *DockerSuite) TestCreateWithWorkdir(c *check.C) {
c.Skip("Fails on Windows CI")
}
name := "foo"
slash := "/"
prefix := ""
if daemonPlatform == "windows" {
prefix = "c:"
slash = `/`
}
prefix, slash := getPrefixAndSlashFromDaemonPlatform()
dir := prefix + slash + "home" + slash + "foo" + slash + "bar"
dockerCmd(c, "create", "--name", name, "-w", dir, "busybox")