mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Docker: Fix PHP tests
This creates another mysql_testing database during db service setup Replace server with env tags in phpunit.xml in order to force override certain parameters when tests are run. See: https://github.com/sebastianbergmann/phpunit/issues/2353 for more information. Rename primary developer Docker database from bookstack-test to bookstack-dev. bookstack-test is used as the mysql_testing database
This commit is contained in:
@ -10,6 +10,7 @@ else
|
||||
composer install
|
||||
wait-for-it db:3306 -t 45
|
||||
php artisan migrate --database=mysql
|
||||
php artisan migrate --database=mysql_testing
|
||||
chown -R www-data:www-data storage
|
||||
exec apache2-foreground
|
||||
fi
|
||||
|
5
dev/docker/init.db/01.sql
Normal file
5
dev/docker/init.db/01.sql
Normal file
@ -0,0 +1,5 @@
|
||||
# create test database
|
||||
CREATE DATABASE IF NOT EXISTS `bookstack-test`;
|
||||
|
||||
# grant rights
|
||||
GRANT ALL PRIVILEGES ON `bookstack-test`.* TO 'bookstack-test'@'%';
|
Reference in New Issue
Block a user