You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we have non 200 response while fetching a url in integrations tests, that usually means the servers did encounter an error.
Test::More proposes to use the diag function to add a message in this cases.
We could write an helper function that return last lines of logs files (log4perl etc.) on failure and use diag to display them.
is $response->{_rc}, 200 || diag(get_server_logs())
Even better, we could have a function (called before doing a request) to register log state before the request (how many lines in them), so that get_server_logs returns all lines of logs emitted during the request (so we are sure to capture the log).
The text was updated successfully, but these errors were encountered:
We did create a tail_log_start and tail_log_read function in APITest.pm, but right now it's only used in create_user sub. We could use it in other functions.
github-actionsbot
removed
the
⏰ Stale
This issue hasn't seen activity in a while. You can try documenting more to unblock it.
label
Nov 26, 2022
This issue has been open 90 days with no activity. Can you give it a little love by linking it to a parent issue, adding relevant labels and projets, creating a mockup if applicable, adding code pointers from https://github.com/openfoodfacts/openfoodfacts-server/blob/main/.github/labeler.yml, giving it a priority, editing the original issue to have a more comprehensive description… Thank you very much for your contribution to 🍊 Open Food Facts
github-actionsbot
added
the
⏰ Stale
This issue hasn't seen activity in a while. You can try documenting more to unblock it.
label
Jan 3, 2024
When we have non 200 response while fetching a url in integrations tests, that usually means the servers did encounter an error.
Test::More proposes to use the diag function to add a message in this cases.
We could write an helper function that return last lines of logs files (log4perl etc.) on failure and use diag to display them.
Even better, we could have a function (called before doing a request) to register log state before the request (how many lines in them), so that get_server_logs returns all lines of logs emitted during the request (so we are sure to capture the log).
The text was updated successfully, but these errors were encountered: