more tests

Signed-off-by: Matej Vasek <mvasek@redhat.com>
This commit is contained in:
Matej Vasek
2020-11-19 19:35:16 +01:00
parent 4d0346c028
commit 24ff6f45a2

View File

@ -3,6 +3,9 @@
# test more container-related endpoints
#
red='\e[31m'
nc='\e[0m'
podman pull $IMAGE &>/dev/null
# Ensure clean slate
@ -29,6 +32,10 @@ curl "http://$HOST:$PORT/containers/${CTR}/archive?path=%2Ftmp%2F" \
-H "Content-Type: application/x-tar" \
--upload-file "${HELLO_TAR}" &> /dev/null
if ! podman exec -it "${CTR}" "grep" "Hello" "/tmp/hello.txt" &> /dev/null ; then
echo -e "${red}NOK: The hello.txt file has not been uploaded.${nc}" 1>&2;
exit 1
fi
t HEAD "containers/${CTR}/archive?path=%2Ftmp%2Fhello.txt" 200
@ -41,9 +48,6 @@ PATH_STAT="$(grep X-Docker-Container-Path-Stat "${TMPD}/headers.txt" | cut -d "
ARCHIVE_TEST_ERROR=""
red='\e[31m'
nc='\e[0m'
if [ "$(echo "${PATH_STAT}" | jq ".name")" != '"hello.txt"' ]; then
echo -e "${red}NOK: Wrong name in X-Docker-Container-Path-Stat header.${nc}" 1>&2;
ARCHIVE_TEST_ERROR="1"