Fix windows CI test

The windows CI is not clean in some tests, this try address that.

Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
This commit is contained in:
Kai Qiang Wu(Kennan) 2016-02-01 00:30:15 +00:00
parent f1e8d2c295
commit 7ed10d4a4c
1 changed files with 2 additions and 5 deletions

View File

@ -456,7 +456,6 @@ func (s *DockerSuite) TestRunVolumesFromInReadWriteMode(c *check.C) {
volumeDir = `c:/test` // Forward-slash as using busybox
fileInVol = `c:/test/file`
} else {
testRequires(c, DaemonIsLinux)
volumeDir = "/test"
fileInVol = "/test/file"
}
@ -3393,18 +3392,16 @@ func (s *DockerSuite) TestRunCreateContainerFailedCleanUp(c *check.C) {
func (s *DockerSuite) TestRunNamedVolume(c *check.C) {
prefix := ""
slash := `/`
if daemonPlatform == "windows" {
prefix = "c:"
slash = `\`
}
testRequires(c, DaemonIsLinux)
dockerCmd(c, "run", "--name=test", "-v", "testing:"+prefix+slash+"foo", "busybox", "sh", "-c", "echo hello > "+prefix+"/foo/bar")
dockerCmd(c, "run", "--name=test", "-v", "testing:"+prefix+"/foo", "busybox", "sh", "-c", "echo hello > "+prefix+"/foo/bar")
out, _ := dockerCmd(c, "run", "--volumes-from", "test", "busybox", "sh", "-c", "cat "+prefix+"/foo/bar")
c.Assert(strings.TrimSpace(out), check.Equals, "hello")
out, _ = dockerCmd(c, "run", "-v", "testing:"+prefix+slash+"foo", "busybox", "sh", "-c", "cat "+prefix+"/foo/bar")
out, _ = dockerCmd(c, "run", "-v", "testing:"+prefix+"/foo", "busybox", "sh", "-c", "cat "+prefix+"/foo/bar")
c.Assert(strings.TrimSpace(out), check.Equals, "hello")
}