Skip to content

Commit

Permalink
fix: allow configuring port for test database (#6236)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
particleflux authored Jul 23, 2022
1 parent 7c8105c commit aeffb71
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
'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'),
Expand Down

0 comments on commit aeffb71

Please sign in to comment.