summaryrefslogtreecommitdiff
path: root/test/apiv2
diff options
context:
space:
mode:
authorEd Santiago <santiago@redhat.com>2022-09-15 16:18:46 -0600
committerEd Santiago <santiago@redhat.com>2022-09-15 20:10:34 -0600
commitcfbc4aaeb50b5fb12ec9363328bb08fc459a1067 (patch)
treee396257e102a885561638fe6702d6c0a6e917743 /test/apiv2
parent750726e62c13941a739ef70040a1ec0d745cdb43 (diff)
downloadpodman-cfbc4aaeb50b5fb12ec9363328bb08fc459a1067.tar.gz
podman-cfbc4aaeb50b5fb12ec9363328bb08fc459a1067.tar.bz2
podman-cfbc4aaeb50b5fb12ec9363328bb08fc459a1067.zip
Cleanup: fix problems reported by shell lint
Followup to #15616, which is not usable as it is (way, way, way too much noise) but actually found a few real nits that should be fixed. Signed-off-by: Ed Santiago <santiago@redhat.com>
Diffstat (limited to 'test/apiv2')
-rwxr-xr-xtest/apiv2/test-apiv212
1 files changed, 6 insertions, 6 deletions
diff --git a/test/apiv2/test-apiv2 b/test/apiv2/test-apiv2
index b762cff9e..8132e6432 100755
--- a/test/apiv2/test-apiv2
+++ b/test/apiv2/test-apiv2
@@ -272,8 +272,8 @@ function t() {
esac
done
if [[ -z "$curl_args" ]]; then
- curl_args=(-d $(jsonify ${post_args[@]}))
- testname="$testname [${curl_args[@]}]"
+ curl_args=(-d $(jsonify ${post_args[*]}))
+ testname="$testname [${curl_args[*]}]"
fi
fi
@@ -336,7 +336,7 @@ function t() {
# Any error from curl is instant bad news, from which we can't recover
if [[ $rc -ne 0 ]]; then
- die "curl failure ($rc) on $url - cannot continue"
+ die "curl failure ($rc) on $url - cannot continue. args=${curl_args[*]}"
fi
# Show returned headers (without trailing ^M or empty lines) in log file.
@@ -384,7 +384,7 @@ function t() {
# Special case: if response code does not match, dump the response body
# and skip all further subtests.
- if [[ $actual_code != $expected_code ]]; then
+ if [[ "$actual_code" != "$expected_code" ]]; then
echo -e "# response: $output"
for i; do
_show_ok skip "$testname: $i # skip - wrong return code"
@@ -671,11 +671,11 @@ echo -e "collected ${#tests_to_run[@]} items\n"
start_service
-for i in ${tests_to_run[@]}; do
+for i in "${tests_to_run[@]}"; do
TEST_CONTEXT="[$(basename $i .at)]"
# Clear output from 'podman' helper
- >| $WORKDIR/output.log
+ truncate --size=0 $WORKDIR/output.log
source $i
done