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

Autosave a test snapshot file on every test exit #1137

Merged
merged 36 commits into from
Nov 11, 2023
Merged

Autosave a test snapshot file on every test exit #1137

merged 36 commits into from
Nov 11, 2023

Conversation

leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented Nov 8, 2023

What

Autosave a test snapshot file on every test exit.

Why

To encourage the over-time consistency testing of contracts. To provide a mechanism where any developer who commits the generated files can see changes in observable behavior that arises unexpectedly over time.

Close #1082

Merging

To be merged to main after:

@leighmcculloch leighmcculloch changed the base branch from main to lessrnd November 8, 2023 02:11
Base automatically changed from lessrnd to main November 8, 2023 02:59
github-merge-queue bot pushed a commit to stellar/rs-soroban-env that referenced this pull request Nov 8, 2023
### What
Add fn to find out if Host can be finished.

### Why
So that the SDK can ask the Host if it has no more references left and
it is able to be finished without calling try_finish which is
destructive.

I plan to use this in:
- stellar/rs-soroban-sdk#1137
@leighmcculloch leighmcculloch changed the base branch from main to prediligently-scyllium November 10, 2023 06:50
@leighmcculloch
Copy link
Member Author

Worth calling out there's no way to turn the generation of test snapshots off. I think there's a lot of value of it always being on. If we were going to add a switch for it, it'd be preferable I think to make it opt out rather than opt in.

Although, maybe it could slow down fuzzer tests so much that it'd be worth adding a flag for.

Base automatically changed from prediligently-scyllium to main November 10, 2023 23:08
@leighmcculloch leighmcculloch marked this pull request as ready for review November 10, 2023 23:20
soroban-sdk/src/env.rs Outdated Show resolved Hide resolved
@leighmcculloch leighmcculloch added this pull request to the merge queue Nov 11, 2023
Merged via the queue into main with commit 23c219b Nov 11, 2023
14 checks passed
@leighmcculloch leighmcculloch deleted the i1082 branch November 11, 2023 00:21
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.

Add test utilities that make it easier to test contract consistency over time
2 participants