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

Refactor ETH Account tests #1098

Merged
merged 27 commits into from
Aug 15, 2024
Merged

Conversation

immrsd
Copy link
Collaborator

@immrsd immrsd commented Aug 13, 2024

Fixes #1075

Repeats the refactoring from the closed PR with all PR issues addressed.

ericnordelo and others added 22 commits June 28, 2024 11:33
* feat: migrate event tests

* feat: update workflow

* feat: add foundry utils

* feat: finish erc20 and erc20votes migration

* feat: remove dual case tests

* refactor: format files

* refactor: variable name

* Update src/tests/token.cairo

Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>

* Update src/tests/token/erc20.cairo

Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>

* Update src/tests/utils/foundry.cairo

Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>

* Update src/tests/token/erc20/test_erc20_votes.cairo

Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>

* feat: apply review updates

---------

Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>
* Update gitignore with snfoundry cache dir

* Delete foundry utils file

* Add snfoundry-related test utils, comment out previous utils

* Update ERC20 event helpers

* Update ERC20 tests

* Update ERC20Votes tests

* Run linter

* Add util function to drop single event

* Fix review issues

* Make Github workflow run on every PR

* Fix review issues

* Bump snforge version

* Support snforge 0.26 in test utils

* Update ERC20 tests to support snforge upgrade

* Run linter
* feat: migrate event tests

* feat: update workflow

* feat: add foundry utils

* feat: finish erc20 and erc20votes migration

* feat: remove dual case tests

* refactor: format files

* refactor: variable name

* Update src/tests/token.cairo

Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>

* Update src/tests/token/erc20.cairo

Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>

* Update src/tests/utils/foundry.cairo

Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>

* Update src/tests/token/erc20/test_erc20_votes.cairo

Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>

* feat: apply review updates

* feat: readd dual20 tests

* refactor: remove unnecessary import

* feat: add dual20 import

---------

Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>
* migrate pausable and initializable tests

* migrate reentrancy guard tests

* clean up tests

* fix fmt

* add event trait to pausable, fix tests

* Apply suggestions from code review

Co-authored-by: Eric Nordelo <eric.nordelo39@gmail.com>

* fix fmt

---------

Co-authored-by: Eric Nordelo <eric.nordelo39@gmail.com>
* feat: update common module

* feat: migrate dual modules

* feat: finish component test migration

* refactor: remove unnecessary imports

* feat: apply review updates
* feat: migrate event tests

* feat: update workflow

* feat: add foundry utils

* feat: finish erc20 and erc20votes migration

* feat: remove dual case tests

* refactor: format files

* refactor: variable name

* Update src/tests/token.cairo

Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>

* Update src/tests/token/erc20.cairo

Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>

* Update src/tests/utils/foundry.cairo

Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>

* Update src/tests/token/erc20/test_erc20_votes.cairo

Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>

* feat: apply review updates

* feat: migrate erc721 components tests

* refactor: remove extra line

* feat: apply review updates

* feat: update utilities

* feat: apply review updates

* fix: ignore tests

---------

Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>
* test: check ignored tests and add reason

* feat: apply review updates
* Update ERC20Votes tests

* Run linter

* Add test helpers for Ownable tests

* Migrate Ownable tests

* Migrate OwnableTwoStep tests

* Migrate Ownable Dual Dispatcher tests

* Support event changes in snforge 0.26

* Resolve review issues

* Address review comments
* Migrate Upgrades tests to Foundry

* Update src/tests/upgrades/test_upgradeable.cairo

Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>

* Update src/tests/upgrades/test_upgradeable.cairo

Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>

---------

Co-authored-by: Eric Nordelo <eric.nordelo39@gmail.com>
Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>
* feat: include erc20 preset tests

* feat: tests updated

* feat: remove unused imports

* feat: add deployments

* Update src/tests/utils/common.cairo

Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>

* feat: apply review updates

---------

Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>
* feat: update tests

* refactor: remove unnecessary import
* fix import name

* migrate cryptography tests

* migrate udc tests

* fix fmt

* fix impl name

* fix event assertions

* re-add class hash helper
* feat: update dual_eth_account tests

* feat: update eth_account tests

* refactor: remove unused helpers

* refactor: some inconsistencies

* Update src/tests/account/ethereum/test_eth_account.cairo

Co-authored-by: immrsd <103599616+immrsd@users.noreply.github.com>

* feat: apply review updates

* refactor: format files

* Update src/tests/account/ethereum/test_eth_account.cairo

Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>

---------

Co-authored-by: immrsd <103599616+immrsd@users.noreply.github.com>
Co-authored-by: Andrew Fleming <fleming.andrew@protonmail.com>
* feat: update dual_eth_account tests

* feat: update eth_account tests

* refactor: remove unused helpers

* feat: update eth account preset tests

* Update src/tests/account/ethereum/test_eth_account.cairo

Co-authored-by: immrsd <103599616+immrsd@users.noreply.github.com>

* Update src/tests/presets/test_eth_account.cairo

Co-authored-by: immrsd <103599616+immrsd@users.noreply.github.com>

* feat: apply review updates

---------

Co-authored-by: immrsd <103599616+immrsd@users.noreply.github.com>
* Migrate AccessControl tests

* Migrate AccessControl Dual Dispatcher tests

* Fix imports

* Address review comments

* Update error messages

* Bring back separator line

* Fix ignore reasons in access module

* Fix review issues
* Update test utils and helpers

* Update signature tests

* Update account tests

* Update dual account tests

* Run linter

* Run linter

* Fix review issues

* Update ignore reason messages

* Run linter

* Support eth account tests changes

* Run linter

* Improve setup functions, remove unused imports

* Remove unnecessary accept_ownership step, make use of serialized_sign fn
* Update test utils and helpers

* Update signature tests

* Update account tests

* Update dual account tests

* Run linter

* Run linter

* Fix review issues

* Update ignore reason messages

* Run linter

* Support eth account tests changes

* Run linter

* Improve setup functions, remove unused imports

* Remove unnecessary accept_ownership step, make use of serialized_sign fn

* Migrate Starknet Account Preset tests, make some code improvements

* Run linter

* Remove unnecessary clone

* Update the comment for assert_entrypoint_not_found_error function

* Minor review fixes
@immrsd immrsd self-assigned this Aug 14, 2024
Copy link
Collaborator

@andrew-fleming andrew-fleming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a suggestion and question. Otherwise, LGTM!

packages/account/src/tests/test_eth_account.cairo Outdated Show resolved Hide resolved
@immrsd immrsd merged commit 9dcc3f5 into OpenZeppelin:main Aug 15, 2024
6 checks passed
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.

Refactor eth account tests
3 participants