Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: test TEST server first before some tests around getProductV3 #859

Merged
merged 1 commit into from
Dec 27, 2023

Conversation

monsieurtanuki
Copy link
Contributor

What

  • The purpose of this PR is to get rid of annoying emails about some specific tests non passing.
  • In that particular case, the TEST server is often funny in its head, and getProductV3 (and of course the corresponding URL) systematically fails with a 502 Bad Gateway error.
  • Instead of receiving error messages about problems that do not regard our code but the current status of the TEST env, we check first if a simple getProductV3 call works. If it triggers a 502, we ignore the test. If it passes, we run the test. IF there's another exception, we fail the test.

@codecov-commenter
Copy link

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (3350251) 75.88% compared to head (bddbd69) 73.00%.
Report is 1 commits behind head on master.

Files Patch % Lines
test/api_get_save_product_test.dart 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #859      +/-   ##
==========================================
- Coverage   75.88%   73.00%   -2.89%     
==========================================
  Files         224      224              
  Lines        7880     7895      +15     
==========================================
- Hits         5980     5764     -216     
- Misses       1900     2131     +231     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@M123-dev M123-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be amazing to stop these (for me push notifications from the Github App), so 100% for this check 💯

@M123-dev M123-dev merged commit 153ec19 into openfoodfacts:master Dec 27, 2023
5 checks passed
@monsieurtanuki
Copy link
Contributor Author

Thank you @M123-dev for your review!

Let's extend the same principle each time we have "irrelevant" test errors. For that we'll need a simple query on the related server.
We can do that "on demand", next time the next tests fail for no "good" reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants