Skip to content

test(KeyRegistry): add test coverage for Ownable2Step #410

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

0xdevant
Copy link

@0xdevant 0xdevant commented Feb 15, 2024

Motivation

As mentioned on issue #262, I added few test cases to have test coverage for Ownable2Step for KeyRegistry contract.
Also formatted some contracts with forge fmt along the updates.

Change Summary

Added test cases for coverage on Ownable2Step for KeyRegistry contract, mainly are fuzz testings on transferring ownership to new owner and revert cases on unauthorized acceptance.

Merge Checklist

Choose all relevant options below by adding an x now or at any time before submitting for review


PR-Codex overview

This PR focuses on code formatting improvements and the addition of new tests for ownership transfer functionality in the KeyRegistry. It enhances readability by reducing unnecessary line breaks and ensures consistency in array initializations.

Detailed summary

  • Simplified array initializations in Bundler.gas.t.sol, BundlerTestSuite.sol, Bundler.t.sol, and KeyRegistryTestHelpers.sol.
  • Combined parameters in constructor calls for Bundler, IdGateway, and KeyRegistry in BundlerTestSuite.sol and LocalDeploy.s.sol.
  • Added new events in KeyRegistry.t.sol.
  • Introduced new tests for ownership transfer functionality in KeyRegistryTest, including revert scenarios for non-owners and acceptance by new owners.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@0xdevant 0xdevant changed the title test: add test coverage for KeyRegistry Ownable2Step test(KeyRegistry): add test coverage for KeyRegistry Ownable2Step Feb 15, 2024
@0xdevant 0xdevant changed the title test(KeyRegistry): add test coverage for KeyRegistry Ownable2Step test(KeyRegistry): add test coverage for Ownable2Step Feb 15, 2024
@0xdevant
Copy link
Author

0xdevant commented Mar 1, 2024

Would appreciate a review from @varunsrin

@boldrack
Copy link

Was this re-addressed in another PR ? surprised it's still opened from February since it was explicitly requested by an existing member of the repo. It was for a requested feat .

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