diff --git a/tests/bud.bats b/tests/bud.bats index 488e60a79b7..738acc59de5 100644 --- a/tests/bud.bats +++ b/tests/bud.bats @@ -267,6 +267,18 @@ _EOF run_buildah 1 run myctr ls -l subdir/ } +@test "bud build with heredoc content" { + run_buildah build -t heredoc $WITH_POLICY_JSON -f $BUDFILES/heredoc/Containerfile . + expect_output --substring "print first line from heredoc" + expect_output --substring "print second line from heredoc" + expect_output --substring "Heredoc writing first file" + expect_output --substring "some text of first file" + expect_output --substring "file2 from python" + expect_output --substring "(your index page goes here)" + expect_output --substring "(robots content)" + expect_output --substring "(humans content)" +} + @test "bud with .containerignore" { _prefetch alpine busybox run_buildah 125 build -t testbud $WITH_POLICY_JSON -f $BUDFILES/containerignore/Dockerfile $BUDFILES/containerignore diff --git a/tests/bud/heredoc/Containerfile b/tests/bud/heredoc/Containerfile new file mode 100644 index 00000000000..9cf5e5d8654 --- /dev/null +++ b/tests/bud/heredoc/Containerfile @@ -0,0 +1,35 @@ +FROM docker.io/library/python:latest + +RUN <> /file1 +echo "some text of first file" >> /file1 +EOF + +RUN cat file1 + +RUN python3 <