-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Closed
Labels
Description
Each time the tests are run, a few random users are created. I can see that a problem when I want to test models, and then the database becomes cluttered really quickly, even if just in dev.
To have two databases, I tried to split env-postgres.env in two files:
env-postgres.env
env-postgres-test.env
Then in docker-compose.test.yml I changed the env_file entry to refer to the new env file.
After that, I run docker-compose up -d
When I try to run the tests, I get an error saying the database does not exist. If I create it manually it works, but more errors are showing because the migrations didn't run automatically. How is the database for the backend automatically created, and how can I do the same for the tests database?
Thanks
Reactions are currently unavailable