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

Refactor test runner injection patterns #277

Merged
merged 35 commits into from
Feb 14, 2023
Merged

Conversation

sandreae
Copy link
Member

@sandreae sandreae commented Feb 13, 2023

Fun weekend refactoring project ;-p

Haven't changed any functionality here, just some nice tidy-up I've been wanting to do forever. Main objectives:

  • use similar pattern for injecting one test db into a test or working with the test db manager for creating many
  • separate the test runner logic from the store population logic for transparency and flexibility
  • don't use rstest for injecting the test runner
  • take the chance to add a few more doc strings to test utils and tests where needed

There are some naming changes and reorganising the modules a little too.

I don't think there is anything controversial here, mostly involved a lot of brainless method renaming 🤣 so I don't think a thorough review is required. Happy to chat about the naming choices if you have input there though @adzialocha.

closes: #276 #208 #183

📋 Checklist

  • Add tests that cover your changes
  • Add this PR to the Unreleased section in CHANGELOG.md
  • Link this PR to any issues it closes
  • New files contain a SPDX license header

@codecov
Copy link

codecov bot commented Feb 13, 2023

Codecov Report

Base: 94.22% // Head: 93.39% // Decreases project coverage by -0.83% ⚠️

Coverage data is based on head (34e3ceb) compared to base (4575251).
Patch coverage: 98.25% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #277      +/-   ##
==========================================
- Coverage   94.22%   93.39%   -0.83%     
==========================================
  Files          62       63       +1     
  Lines        5144     5180      +36     
==========================================
- Hits         4847     4838       -9     
- Misses        297      342      +45     
Impacted Files Coverage Δ
aquadoggo/src/test_utils/db.rs 92.30% <ø> (-2.14%) ⬇️
...quadoggo/src/graphql/client/dynamic_types/tests.rs 23.80% <27.27%> (-76.20%) ⬇️
aquadoggo/src/test_utils/runner.rs 90.69% <93.10%> (+0.50%) ⬆️
aquadoggo/src/db/stores/document.rs 91.44% <100.00%> (-0.34%) ⬇️
aquadoggo/src/db/stores/entry.rs 96.26% <100.00%> (+0.18%) ⬆️
aquadoggo/src/db/stores/log.rs 96.42% <100.00%> (ø)
aquadoggo/src/db/stores/operation.rs 85.43% <100.00%> (+0.09%) ⬆️
aquadoggo/src/db/stores/schema.rs 96.15% <100.00%> (+0.15%) ⬆️
aquadoggo/src/db/stores/task.rs 91.52% <100.00%> (ø)
aquadoggo/src/graphql/client/dynamic_query.rs 96.36% <100.00%> (+0.13%) ⬆️
... and 21 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@sandreae sandreae changed the title Refactor test runner Refactor test runner injection patterns Feb 13, 2023
@adzialocha adzialocha self-requested a review February 14, 2023 09:37
@adzialocha adzialocha merged commit ff7bf3f into main Feb 14, 2023
@adzialocha adzialocha deleted the refactor-test-runner branch February 14, 2023 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants