-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
add coverage for registrar and registry #12988
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.
Tests all look good! Are there any corresponding hardhat tests we can remove or are these all new codepaths?
|
||
uint256 startRegistrarBalance = usdToken18.balanceOf(address(registrar)); | ||
|
||
// approve the upkeep |
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.
typo - "cancel the upkeep"
uint256 endRegistrarBalance = usdToken18.balanceOf(address(registrar)); | ||
assertEq(startRegistrarBalance - amount, endRegistrarBalance); |
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.
can we also test that the $$ is sent back to the admin?
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.
LGTM 👍
Quality Gate passedIssues Measures |
More in AUTO-10143
registerUpkeep in registrar
Existing:
testLink_autoApproveOff_happy
testLink_autoApproveOn_happy
testUSDToken_autoApproveOff_happy
testUSDToken_autoApproveOn_happy
testNative_autoApproveOn_happy
testNative_autoApproveOff_msgValue0
testNative_autoApproveOff_msgValueNot0
testLink_autoApproveOff_revertOnDuplicateEntry
New:
testLink_revertOnInsufficientPayment
testLink_revertOnInvalidAdminAddress
testLink_revertOnInvalidBillingToken
approve in registrar
New:
testUSDToken_happy
cancel in registrar
New:
testUSDToken_happy
AddFunds in registry is very well convered, just updated the name:
testNative_msgValue0: this covers Native
testNative_msgValueNot0: this covers Native
test_RevertsWhen_NativePaymentDoesntMatchBillingToken
test_RevertsWhen_UpkeepDoesNotExist
test_RevertsWhen_UpkeepIsCanceled
test_anyoneCanAddFunds
test_movesFundFromCorrectToken: this covers LINK and USD
test_emitsAnEvent