summaryrefslogtreecommitdiff
path: root/test/apiv2
diff options
context:
space:
mode:
Diffstat (limited to 'test/apiv2')
-rw-r--r--test/apiv2/23-containersArchive.at10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/apiv2/23-containersArchive.at b/test/apiv2/23-containersArchive.at
index ee3e6e104..a6af6f739 100644
--- a/test/apiv2/23-containersArchive.at
+++ b/test/apiv2/23-containersArchive.at
@@ -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"