feat(config): add support for separate test database via .env.test
Summary
This PR adds support for a dedicated PostgreSQL test database by introducing a .env.test file and adapting the config logic to switch automatically based on the ENVIRONMENT variable.
What’s in this PR
- Adds a
.env.testfile withENVIRONMENT=testandPOSTGRES_DB=app_test - Updates
config.pyto dynamically load the correct database - Documents the workflow under a new Testing Environment section in the README
Why
Right now, both development and test environments point to the same DB (app), which can lead to data conflicts during CI runs or local testing.
This solves Issue #125 by making test isolation simple and configuration-driven—no breaking changes introduced.
Additional Notes
- The same Docker Compose setup is used for dev and test
-
.env.testis included by default — let me know if you’d prefer it excluded via.gitignore - This keeps compatibility with all current workflows while making CI cleaner and safer
Hi maintainers!
The check-labels workflow is currently failing because it requires one of the following labels:
breaking, security, feature, bug, refactor, upgrade, docs, lang-all, or internal.
Could you please add one of them? I believe feature would be appropriate in this case.
Thank you very much!
@EmiFunes91, have you checked whether it really works (separate db is used)? I haven't run it yet, but it seems that the implementation is incomplete and it will not work
This pull request has a merge conflict that needs to be resolved.
As this PR has been waiting for the original user for a while but seems to be inactive, it's now going to be closed. But if there's anyone interested, feel free to create a new PR.