Skip to content

Commit

Permalink
tests: Loosen error regexp
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cgwalters authored and rh-atomic-bot committed Jan 19, 2017
1 parent 56891f9 commit 686f910
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test-pull-repeated.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/test-pull-resume.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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!"
Expand Down

0 comments on commit 686f910

Please sign in to comment.