mirror of
https://github.com/clearlinux/docker.git
synced 2026-08-26 18:17:24 +00:00
Move TestBuildAddToSymlinkDest to integration-cli
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user