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

Add cleanup code to the end of Plutus spending tests #1086

Open
saratomaz opened this issue May 12, 2022 · 0 comments
Open

Add cleanup code to the end of Plutus spending tests #1086

saratomaz opened this issue May 12, 2022 · 0 comments
Assignees

Comments

@saratomaz
Copy link
Collaborator

Scope
We have several plutus spending tests that leave funds in the script address when the test is finished (partial spending tests etc.). Some of these funds are lost (namely when locked using the "always fails" plutus script), some can be retrieved.
When we run tests on testnet, we run a code that retrieves as many funds as possible at the end of each testrun. We retrieve change from all addresses that we created, withdraw rewards, deregister pools and stake addresses to get deposits back, etc. But we cannot retrieve funds locked by Plutus scripts, because we don't know all the details at the time we run the cleanup code.

We need to add cleanup code to all such Plutus spending tests so that the locked funds are retrieved back to payment address when the test is finished.

Note
We use something similar in test_pools.py for deregistering pools, search for request.addfinalizer

@saratomaz saratomaz self-assigned this May 12, 2022
@saratomaz saratomaz linked a pull request Jun 1, 2022 that will close this issue
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 a pull request may close this issue.

1 participant