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

test: no global registry in tests #595

Merged
merged 2 commits into from
Mar 3, 2025
Merged

Conversation

dnut
Copy link
Contributor

@dnut dnut commented Mar 1, 2025

It's a good practice to avoid sharing global state across tests. It's easy to initialize a registry, so we don't need to lean on globalRegistry to provide a registry to tests that need one.

@dnut dnut requested review from Sobeston and 0xNineteen March 1, 2025 01:06
Copy link

codecov bot commented Mar 1, 2025

Codecov Report

Attention: Patch coverage is 98.21429% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/shred_network/repair_service.zig 85.71% 1 Missing ⚠️
Files with missing lines Coverage Δ
src/ledger/cleanup_service.zig 84.21% <100.00%> (+0.16%) ⬆️
src/ledger/reader.zig 69.30% <100.00%> (+0.44%) ⬆️
src/ledger/result_writer.zig 82.97% <100.00%> (+0.29%) ⬆️
src/ledger/shred_inserter/shred_inserter.zig 84.39% <100.00%> (+0.04%) ⬆️
src/shred_network/shred_tracker.zig 68.57% <100.00%> (+0.73%) ⬆️
src/shred_network/repair_service.zig 81.65% <85.71%> (-0.17%) ⬇️

... and 1 file with indirect coverage changes

Copy link
Contributor

@Sobeston Sobeston left a comment

Choose a reason for hiding this comment

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

Don't see why not, seems good 👍

@0xNineteen 0xNineteen added this pull request to the merge queue Mar 3, 2025
Merged via the queue into main with commit b3fba1f Mar 3, 2025
17 checks passed
@0xNineteen 0xNineteen deleted the dnut/test/no-global-registry branch March 3, 2025 14:42
dadepo pushed a commit that referenced this pull request Mar 3, 2025
It's a good practice to avoid sharing global state across tests. It's
easy to initialize a registry, so we don't need to lean on
globalRegistry to provide a registry to tests that need one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants