mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-06-27 09:51:14 +00:00
b055450e40
Co-authored-by: Cursor <cursoragent@cursor.com>
4.0 KiB
4.0 KiB
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 — 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. PT-10 (DeliverRouteTiles gRPC stream) runs via dotnet SatelliteProvider.IntegrationTests --run-pt10 inside the script; host-side default API_URL=https://localhost:18980 with TLS trust via ./certs/api.crt (PERF_CA_CERT override). Harness knobs:
| Variable | Default | Purpose |
|---|---|---|
PERF_REPEAT_COUNT |
20 | Cold iterations for PT-07/PT-08/PT-10 distribution |
PERF_UAV_BATCH_SIZE |
10 | Items per PT-08 upload batch |
PERF_PT10_SLOW_MS |
50 | Delay between gRPC stream events on the slow-consumer sub-check (PT-10) |
PERF_JWT_TOKEN |
(minted in-script) | Pre-minted Bearer token; skips --mint-only when set |
PERF_CA_CERT |
$PROJECT_ROOT/certs/api.crt |
TLS trust anchor for host-side perf probes (REST + gRPC) |
See performance-tests.md § PT-10 for pass thresholds.
| Property | Value |
|---|---|
| Execution mode | Sequential (one test at a time) |
| Timeout per test | 15 minutes (HttpClient timeout) |
| Polling interval | 2–3 seconds |
| Max poll attempts | 120–360 (depends on test) |
| Startup wait | 30 retries × 2s = 60s max |