summaryrefslogtreecommitdiff
path: root/test/apiv2
diff options
context:
space:
mode:
authorAnanth Bhaskararaman <antsub@gmail.com>2021-10-25 23:35:11 +0530
committerAnanth Bhaskararaman <antsub@gmail.com>2021-12-14 21:08:31 +0530
commit52b12fe98599625a862b6298c654233ce1ae1bbe (patch)
tree49353b5d2eeb97a80ce91d0d3fea473d1a5a3ad9 /test/apiv2
parent4a060caeabc7061b85a290ba31f87af7d4dbf508 (diff)
downloadpodman-52b12fe98599625a862b6298c654233ce1ae1bbe.tar.gz
podman-52b12fe98599625a862b6298c654233ce1ae1bbe.tar.bz2
podman-52b12fe98599625a862b6298c654233ce1ae1bbe.zip
Fixes #12063 Add docker compatible output after image build.
Signed-off-by: Ananth Bhaskararaman <antsub@gmail.com>
Diffstat (limited to 'test/apiv2')
-rw-r--r--test/apiv2/10-images.at14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/apiv2/10-images.at b/test/apiv2/10-images.at
index 85d4d69ed..115332d0c 100644
--- a/test/apiv2/10-images.at
+++ b/test/apiv2/10-images.at
@@ -229,6 +229,20 @@ if ! grep -q '400 Bad Request' "${TMPD}/headers.txt"; then
BUILD_TEST_ERROR="1"
fi
+curl -XPOST --data-binary @<(cat $CONTAINERFILE_TAR) \
+ -H "content-type: application/tar" \
+ --dump-header "${TMPD}/headers.txt" \
+ -o "${TMPD}/response.txt" \
+ "http://$HOST:$PORT/v1.40/build?dockerfile=containerfile" &> /dev/null
+if ! grep -q '200 OK' "${TMPD}/headers.txt"; then
+ echo -e "${red}NOK: Image build from tar failed response was not 200 OK (application/tar)"
+ BUILD_TEST_ERROR="1"
+fi
+if ! grep -qP '^{"aux":{"ID":"sha256:[0-9a-f]{64}"}}$' "${TMPD}/response.txt"; then
+ echo -e "${red}NOK: Image build response does not contain ID"
+ BUILD_TEST_ERROR="1"
+fi
+
t POST libpod/images/prune 200
t POST libpod/images/prune 200 length=0 []