Files
satellite-provider/_docs/02_document/tests/environment.md
T
Oleksandr Bezdieniezhnykh 179daae235
ci/woodpecker/push/01-test Pipeline failed
ci/woodpecker/push/02-build-push unknown status
[AZ-1123] Document docker-compose.perf.yml port playbook
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 11:01:00 +03:00

58 lines
3.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Test Environment
## Infrastructure
| Component | Technology | Configuration |
|-----------|-----------|---------------|
| System Under Test | SatelliteProvider.Api (Docker container) | ASPNETCORE_ENVIRONMENT=Development |
| Database | PostgreSQL 16 (Docker container) | Fresh DB per test run (migrations auto-applied) |
| Test Runner | Custom console app (SatelliteProvider.IntegrationTests) | Docker container on same network |
| Orchestration | docker-compose.tests.yml | Waits for API health before starting tests |
| Perf orchestration | docker-compose.yml + docker-compose.perf.yml | See [containerization.md](../deployment/containerization.md) — host port 5433 conflict playbook |
## Network Topology
```
[Test Runner] --HTTP--> [API :8080] --TCP--> [PostgreSQL :5432]
|
+--HTTPS--> [Google Maps] (external, real)
```
## External Dependencies
| Dependency | Strategy | Notes |
|------------|----------|-------|
| Google Maps tile server | Real (live) | Integration tests use real downloads; requires GOOGLE_MAPS_API_KEY |
| PostgreSQL | Real (containerized) | Fresh database each run via migrations |
| File system | Real (Docker volume) | ./tiles, ./ready, ./logs mounted |
## Environment Variables
| Variable | Value | Purpose |
|----------|-------|---------|
| API_URL | http://api:8080 | Test runner → API connection |
| ASPNETCORE_ENVIRONMENT | Development | API config mode |
| ConnectionStrings__DefaultConnection | Host=postgres;Port=5432;... | DB connection |
| MapConfig__ApiKey | (from host env) | Google Maps auth |
| GOOGLE_MAPS_API_KEY | (from `.env` or shell env) | Google Maps tile downloads (AZ-487 onward — required for any integration mode) |
| JWT_SECRET | (from `.env` or shell env; ≥ 32 bytes) | HS256 signing key shared by API + test runner (AZ-487); fail-fast at startup if missing |
| JWT_ISSUER | (from `.env` or shell env) | Expected `iss` claim (AZ-494); fail-fast at startup if missing. DEV-ONLY local value: `DEV-ONLY-iss-admin-azaion-local` |
| JWT_AUDIENCE | (from `.env` or shell env) | Expected `aud` claim (AZ-494); fail-fast at startup if missing. DEV-ONLY local value: `DEV-ONLY-aud-satellite-provider` |
| INTEGRATION_TEST_DB_RESET | `enabled` (default) / `skip` (set by `--keep-state`) | AZ-493 reset hook; `enabled` truncates test-table rows on runner start, `skip` preserves them for debugging |
## Test Execution
**Decision**: Docker (no hardware dependencies detected)
**Hardware dependencies found**: None
**Execution method**: `docker-compose -f docker-compose.yml -f docker-compose.tests.yml up --build --abort-on-container-exit`
**Performance tests** (Step 15 / `scripts/run-performance-tests.sh`): start the API with the perf overlay when host port 5433 is occupied — `docker compose -f docker-compose.yml -f docker-compose.perf.yml up -d --build`. Details: [containerization.md](../deployment/containerization.md#compose-overlays-dev--test--perf).
| Property | Value |
|----------|-------|
| Execution mode | Sequential (one test at a time) |
| Timeout per test | 15 minutes (HttpClient timeout) |
| Polling interval | 23 seconds |
| Max poll attempts | 120360 (depends on test) |
| Startup wait | 30 retries × 2s = 60s max |