summaryrefslogtreecommitdiff
path: root/test/apiv2/test-apiv2
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-03-01 21:08:50 +0100
committerGitHub <noreply@github.com>2021-03-01 21:08:50 +0100
commit73044b28172fd0df23836052a9061dc41f51f39a (patch)
tree8fc40cef8828c25bd7a6621451f1d46e17958323 /test/apiv2/test-apiv2
parent8daa014f38f7e7af2b46bef1b1a5870429de0d12 (diff)
parent9435e5b79b3dacca61118b159b06fa38cb1ac0d8 (diff)
downloadpodman-73044b28172fd0df23836052a9061dc41f51f39a.tar.gz
podman-73044b28172fd0df23836052a9061dc41f51f39a.tar.bz2
podman-73044b28172fd0df23836052a9061dc41f51f39a.zip
Merge pull request #9555 from edsantiago/apiv2_test_readability
APIv2 tests: make more maintainable
Diffstat (limited to 'test/apiv2/test-apiv2')
-rwxr-xr-xtest/apiv2/test-apiv27
1 files changed, 7 insertions, 0 deletions
diff --git a/test/apiv2/test-apiv2 b/test/apiv2/test-apiv2
index 5b1e2ef80..d545df245 100755
--- a/test/apiv2/test-apiv2
+++ b/test/apiv2/test-apiv2
@@ -188,6 +188,13 @@ function t() {
# entrypoint path can include a descriptive comment; strip it off
path=${path%% *}
+ # path may include JSONish params that curl will barf on; url-encode them
+ path="${path//'['/%5B}"
+ path="${path//']'/%5D}"
+ path="${path//'{'/%7B}"
+ path="${path//'}'/%7D}"
+ path="${path//':'/%3A}"
+
# curl -X HEAD but without --head seems to wait for output anyway
if [[ $method == "HEAD" ]]; then
curl_args="--head"