-
-
Notifications
You must be signed in to change notification settings - Fork 86
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: add test with multiple ORM schemas #629
test: add test with multiple ORM schemas #629
Conversation
abcae96
to
c3a0265
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thanks for working on this Vincent!
Regarding the failing CI (I'm not familiar with multiple schemas). Do you know what's going on there?
tests/bootstrap.php
Outdated
@@ -29,6 +30,11 @@ | |||
$fs->remove(__DIR__.'/Fixture/Migrations'); | |||
$fs->mkdir(__DIR__.'/Fixture/Migrations'); | |||
|
|||
// restore custom migrations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use Symfony\Component\Filesystem\Filesystem
to just copy the entire directory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filesystem only allows to copy files, not directories
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filesystem::mirror()
should do the trick (but this isn't a big deal)
Hi @kbond,
The This PR is still in WIP till I find a clean solution to test this specific use case. |
c3a0265
to
294a381
Compare
294a381
to
2755bbc
Compare
I'm wondering if a simpler solution would not be to declare two entity managers, affect one entity to this entity manager, and configure the test kernel to not reset this specific EM. WDYT? |
I'm afraid using multiple entity managers won't solve the original issue. The idea is to add non-regression tests to ensure the database is fully and properly removed before running the migrations (cf. #615). The idea here is to have a custom migration which should fail the tests if not run properly (for instance, if |
ok thanks for explanations, I understand better now! |
Fixes #618