Update test per comment in #15555

While backporting a test from main, @edsantiago asked that
the test be adjusted as noted here:
https://github.com/containers/podman/pull/15555#issuecomment-1232791752.

This PR brings those same changes to main for posterity sake.

Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
This commit is contained in:
tomsweeneyredhat
2022-09-01 15:55:39 -04:00
parent d0d1af338a
commit c05b6e5d3b

View File

@ -227,14 +227,15 @@ t GET libpod/images/quay.io/libpod/busybox:latest/exists 204
CONTAINERFILE_WITH_ERR_TAR="${TMPD}/containerfile.tar" CONTAINERFILE_WITH_ERR_TAR="${TMPD}/containerfile.tar"
cat > $TMPD/containerfile << EOF cat > $TMPD/containerfile << EOF
FROM quay.io/fedora/fedora FROM $IMAGE
RUN echo 'some error' >&2 RUN echo 'some error' >&2
EOF EOF
tar --format=posix -C $TMPD -cvf ${CONTAINERFILE_WITH_ERR_TAR} containerfile &> /dev/null tar --format=posix -C $TMPD -cvf ${CONTAINERFILE_WITH_ERR_TAR} containerfile &> /dev/null
t POST "build?q=1&dockerfile=containerfile" $CONTAINERFILE_WITH_ERR_TAR 200 t POST "/build?q=1&dockerfile=containerfile" $CONTAINERFILE_WITH_ERR_TAR 200
response_output=$(cat "$WORKDIR/curl.result.out") if [[ $output == *"some error"* ]];then
if [[ ${response_output} == *"some error"* ]];then _show_ok 0 "compat quiet build" "[should not contain 'some error']" "$output"
_show_ok 0 "compat quiet build" "~ $response_output" "found output from stderr in API" else
_show_ok 1 "compat quiet build"
fi fi
cleanBuildTest cleanBuildTest