Improve AccessManager tests by ernestognw · Pull Request #4613 · OpenZeppelin/openzeppelin-contracts (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation36 Commits63 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Reaches 100% coverage in AccessManager
Every test that either makes use of the _canCallExtended
, _canCallSelf
or canCall
is split in two sections:
- The restrictions tests: These only check the possible execution paths depending on the role and delays. They don't make any assertion other than expected errors.
- The state tests: These are setup with enough permissions so the call succeeds and check for state changes or event emissions.
PR Checklist
- Tests
- Documentation
- Changeset entry (run
npx changeset add
)
ernestognw changed the base branch from master to feat/access-manager
frangio changed the base branch from feat/access-manager to master
Amxx previously approved these changes Sep 28, 2023
Collaborator
Amxx left a comment
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solidity looks good.
Don't have bandwidth to review tests right now. Will take a look later (that is not a merge blocker)
Amxx approved these changes Oct 4, 2023
Collaborator
Amxx left a comment • Loading
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything LGTM.
Again, did no finish reviewing all the tests. The part I reviewed looks good. Contracts loog good.
I raised some comments that should be addressed in a separate PR (they are about the testing part, so don't affect the 5.0 release)
ernestognw added a commit to ernestognw/openzeppelin-contracts that referenced this pull request
Co-authored-by: Hadrien Croubois hadrien.croubois@gmail.com Co-authored-by: Francisco Giordano fg@frang.io
frangio added a commit that referenced this pull request
Co-authored-by: Hadrien Croubois hadrien.croubois@gmail.com Co-authored-by: Francisco Giordano fg@frang.io (cherry picked from commit baf0e91)