Add system test

Signed-off-by: Aleksei Kosyrev <albnnc@gmail.com>
This commit is contained in:
Aleksei Kosyrev 2023-10-07 10:55:51 +03:00
parent 3fdb6ee2df
commit 732cec794e
1 changed files with 19 additions and 0 deletions

View File

@ -668,6 +668,25 @@ EOF
run_podman rmi -f build_test
}
# Regression test for #20259
@test "podman build with ignore '*' and containerfile outside of build context" {
local tmpdir=$PODMAN_TMPDIR/build-test-$(random_string 10)
mkdir -p $tmpdir
mkdir -p $tmpdir/context
cat >$tmpdir/Containerfile <<EOF
FROM scratch
EOF
cat >$tmpdir/context/.containerignore <<EOF
*
EOF
run_podman build -t build_test -f $tmpdir/Containerfile $tmpdir/context
# Clean up
run_podman rmi -f build_test
}
@test "podman build - stdin test" {
# Random workdir, and random string to verify build output
workdir=/$(random_string 10)