summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@redhat.com>2021-09-27 09:23:04 -0400
committerNalin Dahyabhai <nalin@redhat.com>2021-09-27 09:27:06 -0400
commit464fec260c509f59ecc7ca0b9b498f392f34958b (patch)
tree1c2526da1c612bbea8ad23a6fe0f7d93823a9a30 /test
parent800d594afa160353cc7134ef912bf82f266a122c (diff)
downloadpodman-464fec260c509f59ecc7ca0b9b498f392f34958b.tar.gz
podman-464fec260c509f59ecc7ca0b9b498f392f34958b.tar.bz2
podman-464fec260c509f59ecc7ca0b9b498f392f34958b.zip
remote build: EvalSymlinks() the context directory
Use EvalSymlinks() to find the context directory, in case there's shenanigans. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/system/070-build.bats9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/system/070-build.bats b/test/system/070-build.bats
index 0e1396fc6..3faa260e1 100644
--- a/test/system/070-build.bats
+++ b/test/system/070-build.bats
@@ -956,6 +956,15 @@ EOF
run_podman build -t build_test $tmpdir
}
+@test "podman build build context is a symlink to a directory" {
+ tmpdir=$PODMAN_TMPDIR/build-test
+ mkdir -p $tmpdir/target
+ ln -s target $tmpdir/link
+ echo FROM alpine > $tmpdir/link/Dockerfile
+ echo RUN echo hello >> $tmpdir/link/Dockerfile
+ run_podman build -t build_test $tmpdir/link
+}
+
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