-
Notifications
You must be signed in to change notification settings - Fork 181
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
Fails to connect into mysql database when database not created #470
Comments
As a workaround, you can create the database before running tests:
|
Can you try to call |
I can't reproduce this bug on my local environment. Do you use |
I tried to your method to switch It cannot work at any case, because of such stack trace (please follow):
|
I changed the database name in the configuration used on Travis CI and the tests passed: #477 It looks like a specific configuration leads to the error you have, but I'm still wondering what are these parameters. |
Could you please share your Doctrine configuration? |
|
As I see, your tests are such, that |
Thanks for sharing your configuration. Yes it may be due to the fact that you load fixtures in |
I debugged your |
Okay, in my case doesn't work unset as I mentioned, because |
Until the bundle supports multiple databases, we can use a workaround to use only one database during tests: https://stackoverflow.com/a/53726916/2257664 |
What if unset |
Hello,
This library fails to connect into mysql database when database not created with error
An exception occurred in driver: SQLSTATE[HY000] [1049] Unknown database 'test'
Place where error occurs:
https://github.com/liip/LiipFunctionalTestBundle/blob/2.0.0-alpha10/src/Services/DatabaseTools/ORMDatabaseTool.php#L63 or commit to be exact fails because used dbal library performs connect https://github.com/doctrine/dbal/blob/b45ed5e13e4834f64fbc56bfdc0344430cecae63/lib/Doctrine/DBAL/Connection.php#L358 into database despite
unset($params['dbname']);
in your classORMDatabaseTool
in 61 lineSteps to reproduce
and
The text was updated successfully, but these errors were encountered: