mirror of
https://github.com/containers/podman.git
synced 2025-06-19 16:33:24 +08:00
more tests
Signed-off-by: Matej Vasek <mvasek@redhat.com>
This commit is contained in:
@ -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"
|
||||
|
Reference in New Issue
Block a user