Move TestBuildAddToSymlinkDest to integration-cli

Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
This commit is contained in:
Alexandr Morozov
2014-06-17 11:49:07 +04:00
committed by LK4D4
parent 690711b584
commit cc42eeac21
2 changed files with 23 additions and 18 deletions
+23
View File
@@ -1358,3 +1358,26 @@ func TestBuildOnBuildForbiddenMaintainer(t *testing.T) {
}
logDone("build - onbuild forbidden maintainer")
}
// gh #2446
func TestBuildAddToSymlinkDest(t *testing.T) {
name := "testbuildaddtosymlinkdest"
defer deleteImages(name)
ctx, err := fakeContext(`FROM busybox
RUN mkdir /foo
RUN ln -s /foo /bar
ADD foo /bar/
RUN [ -f /bar/foo ]
RUN [ -f /foo/foo ]`,
map[string]string{
"foo": "hello",
})
if err != nil {
t.Fatal(err)
}
defer ctx.Close()
if _, err := buildImageFromContext(name, ctx, true); err != nil {
t.Fatal(err)
}
logDone("build - add to symlink destination")
}