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

refactor: extract reset:migration tests in another testsuite #692

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

Conversation

nikophil
Copy link
Member

@nikophil nikophil commented Sep 2, 2024

This is an experiment, in order to take "reset: migrate" permutation in another testsuite

(by the way, this fixes #694)

@nikophil nikophil force-pushed the refactor/remove-migrate-test-permutation branch 11 times, most recently from 9a26a24 to 3257095 Compare September 3, 2024 08:35
Comment on lines +146 to +152
exclude:
- database: sqlite
use-dama: 0
Copy link
Member Author

@nikophil nikophil Sep 3, 2024

Choose a reason for hiding this comment

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

there is a problem with migrate + sqlite + "no dama" :
because we're calling dropAndResetDatabase() which does not actually drop the database for sqlite:
https://github.com/zenstruck/foundry/blob/2.x/src/ORM/AbstractORMPersistenceStrategy.php#L126-L129

I'm wondering if we should not remove the actual file sqlite.db here, but I'm not sure we can access it easily 🤔

WDYT @kbond ?

@nikophil nikophil marked this pull request as ready for review September 3, 2024 08:50
@nikophil nikophil force-pushed the refactor/remove-migrate-test-permutation branch 4 times, most recently from 7f9cd1e to 4f970e6 Compare September 5, 2024 16:19
@nikophil nikophil force-pushed the refactor/remove-migrate-test-permutation branch from 4f970e6 to e424193 Compare September 5, 2024 16:28
Comment on lines +153 to +154
- database: mysql
with-migration-configuration-file: 'tests/Fixture/MigrationTests/configs/migration-configuration-transactional.php'
Copy link
Member Author

@nikophil nikophil Sep 5, 2024

Choose a reason for hiding this comment

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

I also discovered that for an obscure reason, transactional mode + MySQL is buggy - at least in our tests, I'm not using MySQL currently in my day-to-day job, so I can live with this. If a user comes with a problem around it, I'll dig a little bit more!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[Tests] provide tests for "migration configurations"
1 participant