diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-07-01 13:15:00 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-01 13:15:00 -0400 |
commit | 955c1d2bfeac0c399bbc4d82fd7b72ed4cc868d3 (patch) | |
tree | 1758a6acf60589fa13ae95dd39e3a0e1ddc78c13 /test/apiv2/23-containersArchive.at | |
parent | a855b30f81cc72e67fc40b7301b98124ab0e6d01 (diff) | |
parent | 86c6014145d5b8d4ea51f338beb9bddaa8b5a334 (diff) | |
download | podman-955c1d2bfeac0c399bbc4d82fd7b72ed4cc868d3.tar.gz podman-955c1d2bfeac0c399bbc4d82fd7b72ed4cc868d3.tar.bz2 podman-955c1d2bfeac0c399bbc4d82fd7b72ed4cc868d3.zip |
Merge pull request #10804 from matejvasek/fix-cp-sub-cmd
Implement --archive flag for podman cp
Diffstat (limited to 'test/apiv2/23-containersArchive.at')
-rw-r--r-- | test/apiv2/23-containersArchive.at | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/test/apiv2/23-containersArchive.at b/test/apiv2/23-containersArchive.at index 688ca9f06..c55164780 100644 --- a/test/apiv2/23-containersArchive.at +++ b/test/apiv2/23-containersArchive.at @@ -16,7 +16,7 @@ CTR="ArchiveTestingCtr" TMPD=$(mktemp -d podman-apiv2-test.archive.XXXXXXXX) HELLO_TAR="${TMPD}/hello.tar" echo "Hello" > $TMPD/hello.txt -tar --format=posix -C $TMPD -cvf ${HELLO_TAR} hello.txt &> /dev/null +tar --owner=1042 --group=1043 --format=posix -C $TMPD -cvf ${HELLO_TAR} hello.txt &> /dev/null podman run -d --name "${CTR}" "${IMAGE}" top @@ -72,6 +72,20 @@ if [ "$(tar -xf "${TMPD}/body.tar" hello.txt --to-stdout)" != "Hello" ]; then ARCHIVE_TEST_ERROR="1" fi +# test if uid/gid was set correctly in the server +uidngid=$($PODMAN_BIN --root $WORKDIR/server_root exec "${CTR}" stat -c "%u:%g" "/tmp/hello.txt") +if [[ "${uidngid}" != "1042:1043" ]]; then + echo -e "${red}NOK: UID/GID of the file doesn't match.${nc}" 1>&2; + ARCHIVE_TEST_ERROR="1" +fi + +# TODO: uid/gid should be also preserved on way back (GET request) +# right now it ends up as root:root instead of 1042:1043 +#if [[ "$(tar -tvf "${TMPD}/body.tar")" != *"1042/1043"* ]]; then +# echo -e "${red}NOK: UID/GID of the file doesn't match.${nc}" 1>&2; +# ARCHIVE_TEST_ERROR="1" +#fi + cleanUpArchiveTest if [[ "${ARCHIVE_TEST_ERROR}" ]] ; then exit 1; |