Don't attempt to evaluate drive root on Windows

Signed-off-by: Darren Stahl <darst@microsoft.com>
Upstream-commit: fdce2a7775ec80d769f585c0a400c6cf6615776b
Component: engine
This commit is contained in:
Darren Stahl
2016-09-07 18:20:51 -07:00
parent 8bc9e6240b
commit 4e9c99c3b4
4 changed files with 30 additions and 8 deletions

View File

@ -3022,14 +3022,17 @@ func (s *DockerSuite) TestBuildOnBuild(c *check.C) {
// gh #2446
func (s *DockerSuite) TestBuildAddToSymlinkDest(c *check.C) {
testRequires(c, DaemonIsLinux)
makeLink := `ln -s /foo /bar`
if daemonPlatform == "windows" {
makeLink = `mklink /D C:\bar C:\foo`
}
name := "testbuildaddtosymlinkdest"
ctx, err := fakeContext(`FROM busybox
RUN mkdir /foo
RUN ln -s /foo /bar
RUN sh -c "mkdir /foo"
RUN `+makeLink+`
ADD foo /bar/
RUN [ -f /bar/foo ]
RUN [ -f /foo/foo ]`,
RUN sh -c "[ -f /bar/foo ]"
RUN sh -c "[ -f /foo/foo ]"`,
map[string]string{
"foo": "hello",
})