From: Colin Walters Date: Mon, 9 Jan 2017 01:45:58 +0000 (-0500) Subject: tests: Loosen error regexp X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~41^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=686f91062fd29f776710c5a176a0f5c62cc49af4;p=ostree.git tests: Loosen error regexp libcurl AFAICS doesn't have an API to convert HTTP code :arrow_right: error string, so let's make the test regexp operate on both. Closes: #651 Approved by: giuseppe --- diff --git a/tests/test-pull-repeated.sh b/tests/test-pull-repeated.sh index 5a3af81c..8934e430 100755 --- a/tests/test-pull-repeated.sh +++ b/tests/test-pull-repeated.sh @@ -34,7 +34,7 @@ for x in $(seq 200); do echo "Success on iteration ${x}" break; fi - assert_file_has_content err.txt "500.*Internal Server Error" + assert_file_has_content err.txt "\(500.*Internal Server Error\)\|\(HTTP 500\)" done ${CMD_PREFIX} ostree --repo=repo fsck diff --git a/tests/test-pull-resume.sh b/tests/test-pull-resume.sh index 1e7220d0..06cd0793 100755 --- a/tests/test-pull-resume.sh +++ b/tests/test-pull-resume.sh @@ -42,7 +42,7 @@ do if ${CMD_PREFIX} ostree --repo=repo pull origin main 2>err.log; then break fi - assert_file_has_content err.log 'error:.*Download incomplete' + assert_file_has_content err.log 'error:.*\(Download incomplete\)\|\(Transferred a partial file\)' done if ${CMD_PREFIX} ostree --repo=repo fsck; then echo "ok, pull succeeded!"