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

editoast: refactor Infra tests part 1 #7557

Merged
merged 3 commits into from
May 31, 2024

Conversation

hamz2a
Copy link
Contributor

@hamz2a hamz2a commented May 30, 2024

Part of #6980

@hamz2a hamz2a requested a review from a team as a code owner May 30, 2024 11:32
@codecov-commenter
Copy link

codecov-commenter commented May 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.00%. Comparing base (cfeb8eb) to head (edbb371).
Report is 9 commits behind head on dev.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #7557      +/-   ##
============================================
- Coverage     29.35%   29.00%   -0.36%     
- Complexity     2014     2021       +7     
============================================
  Files          1200     1207       +7     
  Lines        147406   147365      -41     
  Branches       2894     2909      +15     
============================================
- Hits          43276    42747     -529     
- Misses       102426   102903     +477     
- Partials       1704     1715      +11     
Flag Coverage Δ
core 74.99% <ø> (-0.07%) ⬇️
editoast 71.93% <100.00%> (-0.54%) ⬇️
front 9.70% <ø> (-0.04%) ⬇️
gateway 2.41% <ø> (ø)
railjson_generator 87.49% <ø> (ø)
tests 71.85% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Contributor

@leovalais leovalais left a comment

Choose a reason for hiding this comment

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

Nice PR! Here's a few suggestions:

  • Your first commit message is too long. We try to enforce a 70 character limit.

  • You can squash your second and third commit to avoid commented code in the history.

  • There are many tests that are very similar and duplicated for each object type. A nice improvement would be to write a macro_rule! to factorize all that (just like test_persist!).

  • This would be not only valuable to decrease the amount of code, but also to have fewer SQL requests to migrate when we'll try to eliminate diesel outside of editoast_models.

  • Speaking of, some requests may be rewritten using ModelV2's API for listing and counting. If you use a macro, the rewrite would occur only in one place ;)

Except for the git part, none of this is blocking, but it might be worth doing that now while you're working on this part of the code. This way we'll have less work down the line to get a proper models split :)

@hamz2a hamz2a force-pushed the hai/editoast-refactor-infra-tests-part-1 branch from bbfe63f to 6ca8ec6 Compare May 30, 2024 14:12
@hamz2a hamz2a force-pushed the hai/editoast-refactor-infra-tests-part-1 branch from 6ca8ec6 to e88af2b Compare May 30, 2024 14:17
Copy link
Contributor

@leovalais leovalais left a comment

Choose a reason for hiding this comment

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

Good job with the macros! :D

Just a few details and 🚀

@hamz2a hamz2a force-pushed the hai/editoast-refactor-infra-tests-part-1 branch from 21e7bcd to edbb371 Compare May 31, 2024 13:40
@hamz2a hamz2a requested a review from leovalais May 31, 2024 14:01
@hamz2a hamz2a added this pull request to the merge queue May 31, 2024
Merged via the queue into dev with commit e97a8a1 May 31, 2024
17 checks passed
@hamz2a hamz2a deleted the hai/editoast-refactor-infra-tests-part-1 branch May 31, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants