We're using a test override of the docker-compose.yml file when running the test suite, either manually via the run_tests.sh script or during the pre-commit hook. The primary purpose of the override is to set the database environment variables to use the test database instead of materia, which is truncated, reset, and repopulated prior to running the suite. For one reason or another, that behavior is not happening correctly with compose v2. Despite FuelPHP confirming that the test db is currently in use prior to truncating tables, the materia db is either truncated or completely missing after the test suite runs.
Note: there is a time limit for this issue. Compose v1 is being deprecated at the end of June 2023.
Use a volume to store the database outside of the mysql container, so it gets picked up and reused even if the mysql container is recreated with the tests
Check whether prior mysql container instances remain active, albeit orphaned, when a replacement container instance is spun up by compose
We're using a test override of the
docker-compose.yml
file when running the test suite, either manually via therun_tests.sh
script or during the pre-commit hook. The primary purpose of the override is to set the database environment variables to use thetest
database instead ofmateria
, which is truncated, reset, and repopulated prior to running the suite. For one reason or another, that behavior is not happening correctly with compose v2. Despite FuelPHP confirming that the test db is currently in use prior to truncating tables, themateria
db is either truncated or completely missing after the test suite runs.Note: there is a time limit for this issue. Compose v1 is being deprecated at the end of June 2023.