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

test: Run integration tests in transactions #9199

Merged
merged 1 commit into from
Dec 27, 2023

Conversation

ChristophWurst
Copy link
Member

Integration tests for mappers delete all rows and insert fixtured before each test to assure a constant testing data set. The side effect of this is that dev envs break every time tests are run because data (like oc_recipients) vanishes.

Running these tests in transactions allows for a clean test environment while restoring the original data with a rollback.

How to test

  1. Set up a dev env
  2. Add an account to Mail
  3. Sync the account
  4. Run composer run test:integration

main: oc_recipients table is cleared
here: oc_recipients table contents remain

@ChristophWurst
Copy link
Member Author

/backport to stable3.5

@ChristophWurst ChristophWurst merged commit dff7c56 into main Dec 27, 2023
34 checks passed
@ChristophWurst ChristophWurst deleted the test/transactional-db-tests branch December 27, 2023 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

2 participants