tests: Loosen error regexp

libcurl AFAICS doesn't have an API to convert HTTP code ➡️ error
string, so let's make the test regexp operate on both.

Closes: #651
Approved by: giuseppe
This commit is contained in:
Colin Walters authored and Atomic Bot committed 2017-01-19 10:47:15 +00:00
1 parent 56891f9d48
commit 686f91062f
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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
+1 -1
View File
@@ -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!"