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

[Merged by Bors] - Improve test config handling #6699

Closed
wants to merge 4 commits into from

Conversation

fasmat
Copy link
Member

@fasmat fasmat commented Feb 6, 2025

Motivation

Instead of having a dedicated test config just for the node package, adjust the default test config so it works for all tests similarly and fewer tests have to set their own values.

Description

This PR does multiple things:

  • TestConfig functions now take a testing.TB parameter so they aren't accidentally called from within production code
  • I expanded config.DefaultTestConfig to include the parameters that were previously used in node.getTestConfig
  • I removed some places where tests changed the default test config, without the test actually needing a deviating configuration

Test Plan

existing tests pass

TODO

  • Explain motivation or link existing issue(s)
  • Test changes and document test plan
  • Update documentation as needed
  • Update changelog as needed

@fasmat fasmat self-assigned this Feb 6, 2025
@fasmat fasmat force-pushed the improve-test-config-handling branch from 3c0ec83 to 72c7b1f Compare February 6, 2025 12:17
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.8%. Comparing base (106070f) to head (6fc38a3).
Report is 2 commits behind head on develop.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           develop   #6699   +/-   ##
=======================================
  Coverage     79.8%   79.8%           
=======================================
  Files          366     366           
  Lines        49967   50006   +39     
=======================================
+ Hits         39887   39925   +38     
- Misses        7811    7813    +2     
+ Partials      2269    2268    -1     

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

@fasmat
Copy link
Member Author

fasmat commented Feb 6, 2025

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Feb 6, 2025
## Motivation

Instead of having a dedicated test config just for the `node` package, adjust the default test config so it works for all tests similarly and fewer tests have to set their own values.
@spacemesh-bors
Copy link

spacemesh-bors bot commented Feb 6, 2025

Build failed:

@fasmat
Copy link
Member Author

fasmat commented Feb 6, 2025

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Feb 6, 2025
## Motivation

Instead of having a dedicated test config just for the `node` package, adjust the default test config so it works for all tests similarly and fewer tests have to set their own values.
@spacemesh-bors
Copy link

spacemesh-bors bot commented Feb 6, 2025

Build failed:

@fasmat
Copy link
Member Author

fasmat commented Feb 6, 2025

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Feb 6, 2025
## Motivation

Instead of having a dedicated test config just for the `node` package, adjust the default test config so it works for all tests similarly and fewer tests have to set their own values.
@spacemesh-bors
Copy link

spacemesh-bors bot commented Feb 6, 2025

Build failed:

@fasmat
Copy link
Member Author

fasmat commented Feb 6, 2025

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Feb 6, 2025
## Motivation

Instead of having a dedicated test config just for the `node` package, adjust the default test config so it works for all tests similarly and fewer tests have to set their own values.
@spacemesh-bors
Copy link

spacemesh-bors bot commented Feb 6, 2025

Build failed:

@fasmat
Copy link
Member Author

fasmat commented Feb 6, 2025

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Feb 6, 2025
## Motivation

Instead of having a dedicated test config just for the `node` package, adjust the default test config so it works for all tests similarly and fewer tests have to set their own values.
@spacemesh-bors
Copy link

spacemesh-bors bot commented Feb 6, 2025

Build failed:

@fasmat
Copy link
Member Author

fasmat commented Feb 7, 2025

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Feb 7, 2025
## Motivation

Instead of having a dedicated test config just for the `node` package, adjust the default test config so it works for all tests similarly and fewer tests have to set their own values.
@spacemesh-bors
Copy link

spacemesh-bors bot commented Feb 7, 2025

Build failed:

@fasmat
Copy link
Member Author

fasmat commented Feb 7, 2025

bors merge

spacemesh-bors bot pushed a commit that referenced this pull request Feb 7, 2025
## Motivation

Instead of having a dedicated test config just for the `node` package, adjust the default test config so it works for all tests similarly and fewer tests have to set their own values.
@spacemesh-bors
Copy link

spacemesh-bors bot commented Feb 7, 2025

Pull request successfully merged into develop.

Build succeeded:

@spacemesh-bors spacemesh-bors bot changed the title Improve test config handling [Merged by Bors] - Improve test config handling Feb 7, 2025
@spacemesh-bors spacemesh-bors bot closed this Feb 7, 2025
@spacemesh-bors spacemesh-bors bot deleted the improve-test-config-handling branch February 7, 2025 13:07
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.

2 participants