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

Increase unit test coverage #549

Open
minghinmatthewlam opened this issue Sep 13, 2024 · 2 comments
Open

Increase unit test coverage #549

minghinmatthewlam opened this issue Sep 13, 2024 · 2 comments

Comments

@minghinmatthewlam
Copy link

minghinmatthewlam commented Sep 13, 2024

Context and scope
Currently the validator manager contracts haven't kept up as much for unit tests, need to look into test coverage report for forge coverage and get it up to expectations. With our repo structure of having the tests live next to the source code instead of a root tests folder, the forge command would need some tweaks to get accurate test coverage report for just source files.

Discussion and alternatives
Find a reproducible command or script that can test the unit test coverage of the validator manager contracts. Or ideally, different components in this repo like teleporter as well, but not a priority to include for teleporter right now.

Add basic unit tests to bring test coverage up.

Open questions
Example command forge coverage --no-match-coverage "(mocks|teleporter|utilities|governance)"

@michaelkaplan13
Copy link
Collaborator

Additional cases to cover (non-exhaustive):

  • Adding a delegator when a validator is pending removal
  • Trying to completeDelegatorRegistration when a validator is each pending removal and completed
  • Trying to initializeEndDelegator when a validator is each pending removal and completed
  • endDelegationCompletedValidator for delegations pending added, active, and pending removed.

@geoff-vball geoff-vball self-assigned this Sep 23, 2024
@geoff-vball geoff-vball moved this from Backlog 🗄️ to In Progress 🏗 in Platform Engineering Group Sep 23, 2024
@geoff-vball geoff-vball removed their assignment Nov 29, 2024
@geoff-vball
Copy link
Contributor

Mostly completed. ValidatorManager still needs more coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: In Progress 🏗
Development

No branches or pull requests

3 participants