fix: allow configuring port for test database (#6236)

The `testing` database used for the tests had no way to configure a db
server port. It always used some default fallback port (probably of the
pdo driver).

Added the `port` config setting with a new env variable `DB_TEST_PORT`.

Fixes #6200
This commit is contained in:
Stefan Linke
2022-07-23 12:21:21 +00:00
committed by GitHub
parent 7c8105c338
commit aeffb7184e
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -41,6 +41,7 @@ DB_USERNAME=homestead
DB_PASSWORD=secret
DB_PREFIX=
DB_TEST_HOST=127.0.0.1
DB_TEST_PORT=3306
DB_TEST_DATABASE=monica_test
DB_TEST_USERNAME=homestead
DB_TEST_PASSWORD=secret
+1
View File
@@ -99,6 +99,7 @@ $db = [
'testing' => [
'driver' => env('DB_TEST_DRIVER', 'mysql'),
'host' => env('DB_TEST_HOST'),
'port' => env('DB_TEST_PORT', '3306'),
'unix_socket' => env('DB_TEST_UNIX_SOCKET', ''),
'database' => env('DB_TEST_DATABASE'),
'username' => env('DB_TEST_USERNAME'),