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

Resolving reverts in invariant tests #81

Closed
wants to merge 1 commit into from
Closed

Resolving reverts in invariant tests #81

wants to merge 1 commit into from

Conversation

nican0r
Copy link
Contributor

@nican0r nican0r commented Apr 29, 2024

The issue with invariant tests reverting when fail_on_revert was set to true was due to calls to vm.warp not preserving state between calls.

A workaround was added in this PR to Foundry which added the preserve_state to the invariant section of the foundry config.

I've added this to the config and it resolves the issue when running forge test --mc "IonPool_InvariantTest" -v.

In the image below you can see that the invariant tests now run without reverting when fail_on_revert=true

image

@HrikB HrikB self-requested a review April 29, 2024 20:58
@nican0r nican0r closed this by deleting the head repository Apr 30, 2024
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.

2 participants