From 53f2891b7865abafea14314124caa597ce4b41b7 Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Thu, 4 Nov 2021 13:29:32 +0100 Subject: [PATCH] Improve JSON API DirDetails handle type test --- ...API_DirDetails_handle_correct_64bit_integer_type.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/test_JSON_API_DirDetails_handle_correct_64bit_integer_type.sh b/tests/test_JSON_API_DirDetails_handle_correct_64bit_integer_type.sh index 95918256c..03b99a94e 100755 --- a/tests/test_JSON_API_DirDetails_handle_correct_64bit_integer_type.sh +++ b/tests/test_JSON_API_DirDetails_handle_correct_64bit_integer_type.sh @@ -39,7 +39,15 @@ function tLog() echo "$mCategory $(date) $@" >&2 } -mReply="$(curl -u "$API_TOKEN" "$API_BASE_URL/rsFiles/requestDirDetails")" +mCmd="curl -u $API_TOKEN $API_BASE_URL/rsFiles/requestDirDetails" + +mReply="$($mCmd)" +mCurlRet="$?" + +if [ "$mCurlRet" != 0 ]; then + tLog E "$mCmd failed: $mCurlRet '$mReply'" + exit -3 +fi [ "$(echo "$mReply" | jq '.retval')" == "true" ] || {