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 upgradability tests #437

Merged
merged 36 commits into from
Jul 26, 2023

Conversation

heueristik
Copy link
Contributor

@heueristik heueristik commented Jul 18, 2023

Description

Refactored upgrade tests to use hardhat-upgrades properly. It now alerts if the storage layout becomes corrupted.

To try it out, make a change to a contract and execute yarn clean && yarn build && yarn test to see the effects.

Bildschirmfoto 2023-07-21 um 09 09 18

Task ID: OS-408

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.
  • I ran all tests with success and extended them if necessary.
  • I have updated the CHANGELOG.md file in the root folder.
  • I have updated the DEPLOYMENT_CHECKLIST file in the root folder.
  • I have updated the UPDATE_CHECKLIST file in the root folder.

@heueristik heueristik changed the title Remove redun generic upgradability tests that don't t Refactor upgradability tests Jul 18, 2023
@heueristik heueristik force-pushed the feature/OS-408-upgradability-test-cleanup branch from 03f57a1 to 323c8d9 Compare July 19, 2023 15:50
@heueristik heueristik changed the base branch from develop to f/OS-532-add-checks-to-getMergedAbi July 19, 2023 15:51
@heueristik heueristik marked this pull request as ready for review July 20, 2023 08:01
UPDATE_CHECKLIST.md Outdated Show resolved Hide resolved
Base automatically changed from f/OS-532-add-checks-to-getMergedAbi to develop July 21, 2023 08:53
mathewmeconry
mathewmeconry previously approved these changes Jul 21, 2023
Copy link
Contributor

@mathewmeconry mathewmeconry left a comment

Choose a reason for hiding this comment

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

LGTM
Can you confirm that the test coverage doesn't decrease and that we also cover the same unhappy paths as before?

@heueristik
Copy link
Contributor Author

LGTM Can you confirm that the test coverage doesn't decrease and that we also cover the same unhappy paths as before?

Yes @mathewmeconry, the previous tests weren't actually doing anything useful: hardhat-upgrades wasn't used and the automated tests were upgrading every contract to ethers.constants.AddressZero and used the PluginUUPSUpgradeableV1Mock__factory, which doesn't make any sense.

@heueristik heueristik merged commit 9a09328 into develop Jul 26, 2023
@heueristik heueristik deleted the feature/OS-408-upgradability-test-cleanup branch July 26, 2023 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants