From c05b6e5d3b10f66c7a439419898c810d2d67740a Mon Sep 17 00:00:00 2001
From: tomsweeneyredhat <tsweeney@redhat.com>
Date: Thu, 1 Sep 2022 15:55:39 -0400
Subject: 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>
---
 test/apiv2/10-images.at | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

(limited to 'test')

diff --git a/test/apiv2/10-images.at b/test/apiv2/10-images.at
index 86ee2a1f5..3ffc6f738 100644
--- a/test/apiv2/10-images.at
+++ b/test/apiv2/10-images.at
@@ -227,14 +227,15 @@ 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
+FROM $IMAGE
 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"
+t POST "/build?q=1&dockerfile=containerfile" $CONTAINERFILE_WITH_ERR_TAR 200
+if [[ $output == *"some error"* ]];then
+    _show_ok 0 "compat quiet build" "[should not contain 'some error']" "$output"
+else
+    _show_ok 1 "compat quiet build"
 fi
 
 cleanBuildTest
-- 
cgit v1.2.3-54-g00ecf