summaryrefslogtreecommitdiff
path: root/test/system/070-build.bats
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-05-20 16:09:40 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2021-05-22 05:27:03 -0400
commitf22791aec7b4d942872ca21539a44d0375b73949 (patch)
tree6db26ccde1ea0defb78d21109be6b4d6997cf080 /test/system/070-build.bats
parent490915c68e6fce48508d42d138ac1c92c877abe7 (diff)
downloadpodman-f22791aec7b4d942872ca21539a44d0375b73949.tar.gz
podman-f22791aec7b4d942872ca21539a44d0375b73949.tar.bz2
podman-f22791aec7b4d942872ca21539a44d0375b73949.zip
Handle hard links in remote builds
Fixes: https://github.com/containers/podman/issues/9893 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test/system/070-build.bats')
-rw-r--r--test/system/070-build.bats20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/system/070-build.bats b/test/system/070-build.bats
index d2d56c051..9e1559013 100644
--- a/test/system/070-build.bats
+++ b/test/system/070-build.bats
@@ -766,6 +766,26 @@ EOF
is "$output" ".*/tmp/bogus: no such file or directory"
}
+@test "podman build COPY hardlinks " {
+ tmpdir=$PODMAN_TMPDIR/build-test
+ mkdir -p $tmpdir
+
+ dockerfile=$tmpdir/Dockerfile
+ cat >$dockerfile <<EOF
+FROM $IMAGE
+COPY . /test
+EOF
+ ln $dockerfile $tmpdir/hardlink
+
+ run_podman build -t build_test $tmpdir
+ run_podman run --rm build_test stat -c '%i' /test/Dockerfile
+ dinode=$output
+ run_podman run --rm build_test stat -c '%i' /test/hardlink
+ is "$output" "$dinode" "COPY hardlinks work"
+
+ run_podman rmi -f build_test
+}
+
function teardown() {
# A timeout or other error in 'build' can leave behind stale images
# that podman can't even see and which will cascade into subsequent