summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatej Vasek <mvasek@redhat.com>2020-11-19 19:35:16 +0100
committerMatej Vasek <mvasek@redhat.com>2020-11-19 20:31:47 +0100
commit24ff6f45a23d87d413aff477bd3d40993c4b2218 (patch)
treeb5eaaa4052841aea8ed7fd555a117e493ea9bbf4
parent4d0346c028589737591615a308f69736a9fa0534 (diff)
downloadpodman-24ff6f45a23d87d413aff477bd3d40993c4b2218.tar.gz
podman-24ff6f45a23d87d413aff477bd3d40993c4b2218.tar.bz2
podman-24ff6f45a23d87d413aff477bd3d40993c4b2218.zip
more tests
Signed-off-by: Matej Vasek <mvasek@redhat.com>
-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"