From 686f91062fd29f776710c5a176a0f5c62cc49af4 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sun, 8 Jan 2017 20:45:58 -0500 Subject: [PATCH] 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 --- tests/test-pull-repeated.sh | 2 +- tests/test-pull-resume.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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!"