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:
@ -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")
|
||||
|
Reference in New Issue
Block a user