One plugin has no database connection during tests

I’m trying to test my application using BitBucket Pipelines. I have two plugins that i have written. All do the same unit tests for the tables with fixtures and integration tests for the controllers. However one plugin gets tested absolutely fine, the other plugin throws this error message:

Cake\Database\Exception\MissingConnectionException: Connection to Mysql could not be established: SQLSTATE[HY000] [2002] No such file or directory

Strangely the error occured only after adding a second plugin and the plugin that is throwing the error is the plugin that worked fine before i added the second plugin.

On my local machine all tests run fine. It’s just with BitBucket Pipelines that the error occures. Does anybody have a clue what could be wrong?

Btw: i’m using as the database host. I’m aware that this error message normally occures when using localhost.

I had to define both default as well as test datasources to get it working fine in bitbpucket pipelines.

But my tests are of course for an app, not a plugin.

1 Like

Thank you so much :slight_smile: That resolved the issue. Now it’s complaining about missing default values, but i guess i have to change the sql mode of the mysql server.

Thanks for helping me, i was sitting here for days trying to resolve that issue.