-
Notifications
You must be signed in to change notification settings - Fork 27
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
Unit test coverage #624
Unit test coverage #624
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not requesting changes (necessarily), so leaving as a "comment" review.
If you don't want to make change, you can just re-request a review and I'll approve, but please respond to that one question first! Just making sure you wanted to do that.
contracts/validator-manager/tests/ERC20TokenStakingManagerTests.t.sol
Outdated
Show resolved
Hide resolved
contracts/validator-manager/tests/PoSValidatorManagerTests.t.sol
Outdated
Show resolved
Hide resolved
); | ||
} | ||
|
||
function testRegisterSubnetValidatorMessageInvalidInputLength() public { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we change the name here? It looks like this test checks 3 different invalid cases and not just InvalidInputLength
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think the two tests below got copied into this test accidentally on a merge. All fixed now.
} | ||
|
||
function testRegisterSubnetValidatorMessageInvalidCodecID() public { | ||
(, bytes memory packed) = ValidatorMessages.packRegisterL1ValidatorMessage( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do this test case and testRegisterSubnetValidatorMessageInvalidTypeID
below re-test functionality tested above? I agree that it would make sense to remove it from the above in that case to have a single test for single error state but we should be able to use _getPackedRegisterL1ValidatorMessage()
as well
Why this should be merged
Provides full coverage for all Validator Manager contracts except
ValidatorManager.sol
(WIP).There are a couple checks that are currently unreachable, but I think are still good to have for when code changes.
Covecov doesn't seem to be able to handle one of the
if, elif, else
statements.How this was tested
How is this documented
N/A