summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-05-24 16:38:26 +0200
committerGitHub <noreply@github.com>2021-05-24 16:38:26 +0200
commit2311a02c38d42b5e0cf3981a35701c77b1b4f6d0 (patch)
tree21693a6a02bcb0a5d9689e2929ccfa16f82df57f /test
parentb060a7726e8e97f7752b40f18e69236cb330d22d (diff)
parentf22791aec7b4d942872ca21539a44d0375b73949 (diff)
downloadpodman-2311a02c38d42b5e0cf3981a35701c77b1b4f6d0.tar.gz
podman-2311a02c38d42b5e0cf3981a35701c77b1b4f6d0.tar.bz2
podman-2311a02c38d42b5e0cf3981a35701c77b1b4f6d0.zip
Merge pull request #10421 from rhatdan/build
Handle hard links in remote builds
Diffstat (limited to 'test')
-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