This commit is contained in:
2025-10-10 09:39:58 +02:00
parent 4a428b9af6
commit ddce0e39b3
36 changed files with 6410 additions and 1419 deletions
+27
View File
@@ -0,0 +1,27 @@
# Integration Test Setup
The backend integration tests talk to a real Postgres database. To spin up an ephemeral instance locally, use the dedicated compose file:
```bash
docker compose -f docker-compose.test.yml up -d
```
This starts Postgres on port `5433` with the database/user both named `paperless` and password `paperless_test`. Point the test harness at it:
```bash
export TEST_DATABASE_URL=postgres://paperless:paperless_test@localhost:5433/paperless_test
```
Run the tests as usual:
```bash
cargo test
```
When you are done, stop the container:
```bash
docker compose -f docker-compose.test.yml down
```
The compose file uses a tmpfs volume, so each run starts with a clean database.