From e634470fae851325661f6dc1d714872cc567d306 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Thu, 25 Aug 2022 08:23:14 -0600 Subject: APIv2 test cleanup, part 2 of 2 This finishes the removal of curls and exits. Please please please, everyone, if you see a 'curl' or 'exit' in any new PR, reject the PR and tell me immediately so I can help the developer do it the proper way. Also, removed some very-very-wrong USER/UID code. Both are reserved variables in bash. You cannot override them. Also, added a cleanup to a system-connection test. I wasted a lot of time because my podman-remote stopped working, all because I had run this test as part of something unrelated. Also, found and fixed dangerously-broken timeout code. Implemented a new mechanism for requiring a timeout. Signed-off-by: Ed Santiago --- test/apiv2/70-short-names.at | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'test/apiv2/70-short-names.at') diff --git a/test/apiv2/70-short-names.at b/test/apiv2/70-short-names.at index bd7f8e7bd..95cf0e1d0 100644 --- a/test/apiv2/70-short-names.at +++ b/test/apiv2/70-short-names.at @@ -33,18 +33,8 @@ RUN touch /foo EOF tar --format=posix -C $TMPD -cvf ${CONTAINERFILE_TAR} containerfile &> /dev/null - curl -XPOST --data-binary @<(cat $CONTAINERFILE_TAR) \ - -H "content-type: application/x-tar" \ - --dump-header "${TMPD}/headers.txt" \ - -o "${TMPD}/response.txt" \ - "http://$HOST:$PORT/build?dockerfile=containerfile&t=$tag" &> /dev/null - - if ! grep -q '200 OK' "${TMPD}/headers.txt"; then - cat "${TMPD}/headers.txt" - cat "${TMPD}/response.txt" - echo -e "${red}NOK: Image build from tar failed response was not 200 OK (application/x-tar)" - exit 1 - fi + t POST "/build?dockerfile=containerfile&t=$tag" $CONTAINERFILE_TAR 200 \ + .stream~".*Successfully tagged .*" rm -rf $TMPD t DELETE "images/$fqn" 200 -- cgit v1.2.3-54-g00ecf