Files
admin/e2e/README.md
T
2026-04-16 06:25:36 +03:00

1.2 KiB

Azaion Admin API — black-box E2E tests

Run (Docker)

From the repository root:

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.