summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAditya R <arajan@redhat.com>2022-05-23 14:37:51 +0530
committerAditya R <arajan@redhat.com>2022-05-24 00:21:04 +0530
commit2133edb2ca18820585f260db287bd40a57e7b4a2 (patch)
treebfcc6d599ec1c3c40b0717baf758840f73acf18b /test
parent5c51e1d26ea7cb942008cf0e740bc16cb44bb2cf (diff)
downloadpodman-2133edb2ca18820585f260db287bd40a57e7b4a2.tar.gz
podman-2133edb2ca18820585f260db287bd40a57e7b4a2.tar.bz2
podman-2133edb2ca18820585f260db287bd40a57e7b4a2.zip
compat, build: suppress step errors when quiet is set
Match with docker API and suppress step errors when field quiet is set. Closes: https://github.com/containers/podman/issues/14315 Signed-off-by: Aditya R <arajan@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/apiv2/10-images.at12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/apiv2/10-images.at b/test/apiv2/10-images.at
index fd04e3f1b..13aaea317 100644
--- a/test/apiv2/10-images.at
+++ b/test/apiv2/10-images.at
@@ -225,6 +225,18 @@ t POST "images/load" ${TMPD}/test.tar 200 \
t GET libpod/images/quay.io/libpod/alpine:latest/exists 204
t GET libpod/images/quay.io/libpod/busybox:latest/exists 204
+CONTAINERFILE_WITH_ERR_TAR="${TMPD}/containerfile.tar"
+cat > $TMPD/containerfile << EOF
+FROM quay.io/fedora/fedora
+RUN echo 'some error' >&2
+EOF
+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
+response_output=$(cat "$WORKDIR/curl.result.out")
+if [[ ${response_output} == *"some error"* ]];then
+ _show_ok 0 "compat quiet build" "~ $response_output" "found output from stderr in API"
+fi
+
cleanBuildTest
# vim: filetype=sh