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

Fix #811 Document use_test_transactions and expose it using an environment variable #818

Merged
merged 3 commits into from
Sep 8, 2020

Conversation

fzzzy
Copy link
Contributor

@fzzzy fzzzy commented Sep 2, 2020

Description

Normally, when running cargo test, the test transaction data is discarded. This makes debugging test state difficult. There is a use_test_transactions setting that can be overridden, but the tests then re-override your decision to force them on.

This branch exposes the variable using the SYNC_DATABASE_USE_TEST_TRANSACTIONS environment variable.

Also, it documents how to use this feature.

Testing

All tests should pass.

Running SYNC_DATABASE_USE_TEST_TRANSACTIONS=false cargo test commit should leave data in the mysql database.

Running cargo test commit should not leave anything in the database, as usual.

Issue(s)

Closes #811

tublitzed
tublitzed previously approved these changes Sep 2, 2020
Copy link
Contributor

@tublitzed tublitzed left a comment

Choose a reason for hiding this comment

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

👍

@jrconlin jrconlin merged commit b197107 into master Sep 8, 2020
@jrconlin jrconlin deleted the disable-test-transactions branch September 8, 2020 15:49
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.

Document use_test_transactions and expose it using an environment variable
3 participants