From ea704da726177a75c5635b3fbaf2d86cec759ee7 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Mon, 8 Feb 2021 14:38:44 -0700 Subject: 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 --- test/apiv2/12-imagesMore.at | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/apiv2/12-imagesMore.at') diff --git a/test/apiv2/12-imagesMore.at b/test/apiv2/12-imagesMore.at index d17df79a4..fe6a271ce 100644 --- a/test/apiv2/12-imagesMore.at +++ b/test/apiv2/12-imagesMore.at @@ -24,7 +24,7 @@ t GET libpod/images/$IMAGE/json 200 \ # Run registry container podman run -d --name registry -p 5000:5000 quay.io/libpod/registry:2.6 /entrypoint.sh /etc/docker/registry/config.yml -sleep 2 +wait_for_port localhost 5000 # Push to local registry t POST "images/localhost:5000/myrepo/push?tlsVerify=false&tag=mytag" '' 200 -- cgit v1.2.3-54-g00ecf