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

Make Env::default and Env::from_snapshot configure the environment the same #1133

Merged
merged 3 commits into from Nov 7, 2023

Conversation

brson
Copy link
Contributor

@brson brson commented Nov 6, 2023

What

Make Env::default (when cfg testutils) and Env::from_snapshot configure the environment with a source account, a prng seed, and the debug diagnostics level. Do not turn on recording auth.

Fixes #1101

Why

Users writing tests will expect a test environment to be configured similarly regardless of how it was constructed. At present these two constructors create differently-configured environments.

Known limitations

na

Copy link
Member

@leighmcculloch leighmcculloch left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this 🙏🏻 .

I pushed a tweak to the assertions to understand what the error is in this case and that the expected error is indeed what's being triggered and not some other error by happenstance.

@leighmcculloch leighmcculloch added this pull request to the merge queue Nov 7, 2023
Merged via the queue into stellar:main with commit 5d55da6 Nov 7, 2023
14 checks passed
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.

Env::from_snapshot no longer creates an Env consistent with Env::default
2 participants