[AZ-189] [AZ-190] [AZ-191] [AZ-192] [AZ-193] [AZ-194] [AZ-195] Add e2e blackbox test suite

Made-with: Cursor
This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-04-16 06:25:36 +03:00
parent 1b38e888e1
commit d320d6dd59
98 changed files with 6883 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
# Azaion Admin API — black-box E2E tests
## Run (Docker)
From the repository root:
```bash
docker compose -f docker-compose.test.yml up --build --abort-on-container-exit --exit-code-from e2e-consumer
```
Reports are written to `e2e/test-results/` on the host (`results.trx`, `results.xunit.xml`).
## Database bootstrap
The stock Postgres entrypoint runs every file in `/docker-entrypoint-initdb.d/` against `POSTGRES_DB` only. The scripts under `env/db/` expect different databases (`postgres` vs `azaion`), so `e2e/db-init/00_run_all.sh` runs `01_permissions.sql` on `postgres`, then `02_structure.sql`, `03_add_timestamp_columns.sql`, and `99_test_seed.sql` on `azaion`. The compose file uses `POSTGRES_USER=postgres` so `01_permissions.sql` can create roles and the `azaion` database as written.
`99_test_seed.sql` sets `azaion_admin` / `azaion_reader` passwords to `test_password` (matching the API connection strings) and updates seed user password hashes for `Admin1234` and `Upload1234`.
## Local `dotnet test` (without Docker)
`appsettings.test.json` targets `http://system-under-test:8080`. Running tests on the host will fail fixture setup unless you override `ApiBaseUrl` (for example via environment variables) and run the API plus Postgres yourself.