-
Notifications
You must be signed in to change notification settings - Fork 122
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
Test framework: Initial impl of exhaustive state verification with rollback #1713
Conversation
Commiting for testing CI.
This reverts commit ba8b4b6.
Rename decorator and fix tests
Could you please update the description to reflect the changes, and also add some in code comments as doc on the function on the final state that you expect before it's usable - along with a note that it's currently an expensive one to be called and that use caution if used before the final state impl is finished. Happy to merge it after that to prevent it from becoming stale. |
Waiting on fix to #1788 responsible for consortium test fail |
What kind of PR is this?:
/kind fix
What this PR does / why we need it:
Adds
capture_rollback_verify
decorator to DefiTestFramework.Any member function inside a given DefiTestFramework child class can now use
@DefiTestFramework.capture_rollback_verify
decorator. This decorator will capture the state of the chain, run a rollback and verify the data is properly restored after the function execution.Usage example
WARNING: This decorator when used in large tests can become very expensive. The following commands are run to gather the data to be verified on rollback: