Skip to content

Test collect health #93

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
merged 7 commits into from
Mar 17, 2025
Merged

Test collect health #93

merged 7 commits into from
Mar 17, 2025

Conversation

johnstonematt
Copy link
Contributor

Added tests for the collectHealth function. This involved some extra steps:

  • Making it easy to return errors using the mock client/server.
  • Refactoring collectHealth to a separate ExtractHealthAndNumSlotsBehind function which contains the bulk of the logic.
  • Adding the actual tests.

Most of the tests are written using the cases provided in the RPC docs.

ALSO, I renamed rpc.RPCError -> rpc.Error :)

@johnstonematt johnstonematt requested a review from SEJeff March 12, 2025 16:56
@johnstonematt johnstonematt requested a review from empijei March 14, 2025 11:30
Copy link
Contributor

@empijei empijei left a comment

Choose a reason for hiding this comment

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

Quick review on the fly, sorry about that

@johnstonematt johnstonematt merged commit 0a9ee67 into master Mar 17, 2025
2 checks passed
@johnstonematt johnstonematt deleted the test-collect-health branch March 17, 2025 09:53
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