summaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-05-25 02:39:51 -0700
committerGitHub <noreply@github.com>2021-05-25 02:39:51 -0700
commit78df4f6fb2e2a404ace69219a50652f4335b7ce1 (patch)
tree2d7cf493989d8f58b4208208c09bef6742aee327 /test/system
parenta6f0ac229f57c1ac93fe0604dd923f704e976d9a (diff)
parentafe33573d7a0d69a615e3a908110eb90a1c3a5a3 (diff)
downloadpodman-78df4f6fb2e2a404ace69219a50652f4335b7ce1.tar.gz
podman-78df4f6fb2e2a404ace69219a50652f4335b7ce1.tar.bz2
podman-78df4f6fb2e2a404ace69219a50652f4335b7ce1.zip
Merge pull request #10446 from rhatdan/build
Handle hard links in different directories
Diffstat (limited to 'test/system')
-rw-r--r--test/system/070-build.bats14
1 files changed, 11 insertions, 3 deletions
diff --git a/test/system/070-build.bats b/test/system/070-build.bats
index 9e1559013..0f3f3fa7f 100644
--- a/test/system/070-build.bats
+++ b/test/system/070-build.bats
@@ -768,19 +768,27 @@ EOF
@test "podman build COPY hardlinks " {
tmpdir=$PODMAN_TMPDIR/build-test
- mkdir -p $tmpdir
+ subdir=$tmpdir/subdir
+ subsubdir=$subdir/subsubdir
+ mkdir -p $subsubdir
dockerfile=$tmpdir/Dockerfile
cat >$dockerfile <<EOF
FROM $IMAGE
COPY . /test
EOF
- ln $dockerfile $tmpdir/hardlink
+ ln $dockerfile $tmpdir/hardlink1
+ ln $dockerfile $subdir/hardlink2
+ ln $dockerfile $subsubdir/hardlink3
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
+ run_podman run --rm build_test stat -c '%i' /test/hardlink1
+ is "$output" "$dinode" "COPY hardlinks work"
+ run_podman run --rm build_test stat -c '%i' /test/subdir/hardlink2
+ is "$output" "$dinode" "COPY hardlinks work"
+ run_podman run --rm build_test stat -c '%i' /test/subdir/subsubdir/hardlink3
is "$output" "$dinode" "COPY hardlinks work"
run_podman rmi -f build_test