aboutsummaryrefslogtreecommitdiff
path: root/test/apiv2/23-containersArchive.at
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2021-02-08 14:38:44 -0700
committerEd Santiago <santiago@redhat.com>2021-02-09 10:43:54 -0700
commitea704da726177a75c5635b3fbaf2d86cec759ee7 (patch)
tree6b508a5aee1cfa53c8bde58585dcd5da5d0c3c45 /test/apiv2/23-containersArchive.at
parent721a1e104e388a788ab5760019fa91bcf1a5d762 (diff)
downloadpodman-ea704da726177a75c5635b3fbaf2d86cec759ee7.tar.gz
podman-ea704da726177a75c5635b3fbaf2d86cec759ee7.tar.bz2
podman-ea704da726177a75c5635b3fbaf2d86cec759ee7.zip
APIv2 tests: lots of cleanup
It's been a while since I last looked at these; some cruft has crept in, generating noise and hence unreadable test results. Clean it up: * remove pushd/popd in one subtest, replace with 'tar -C'. (Also remove confusing quotation marks). This removes spurious directory names from output. * in like(), show only first line of actual output. Some commands ('tree', 'generate kube') produce voluminous multi-line output, which is super useless and distracting when reading a test run. * Recognize that some queries will not generate output, e.g. HEAD requests and some POSTs. Deal with that. This fixes "curl.result.out: no such file" and "parse error" warnings. * In cleanup, 'podman rm -a' and 'rmi -af'; this gets rid of errors when deleting $WORKDIR. (EBUSY error when root, EPERM when rootless). And, the original reason for poking in here: refactor the wait-for-port part of start_server() into its own helper function, so we can use it when starting a local registry in 12-imagesMore. (Ref: #9270) Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/apiv2/23-containersArchive.at')
-rw-r--r--test/apiv2/23-containersArchive.at9
1 files changed, 3 insertions, 6 deletions
diff --git a/test/apiv2/23-containersArchive.at b/test/apiv2/23-containersArchive.at
index 459800196..688ca9f06 100644
--- a/test/apiv2/23-containersArchive.at
+++ b/test/apiv2/23-containersArchive.at
@@ -13,13 +13,10 @@ podman rm -a -f &>/dev/null
CTR="ArchiveTestingCtr"
-TMPD=$(mktemp -d)
-pushd "${TMPD}"
-echo "Hello" > "hello.txt"
-tar --format=posix -cvf "hello.tar" "hello.txt" &> /dev/null
-popd
-
+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
podman run -d --name "${CTR}" "${IMAGE}" top