mirror of
https://github.com/azaion/ui.git
synced 2026-06-21 11:41:11 +00:00
b016fd8207
AZ-498 — self-hosted satellite tiles + drop classic/satellite toggle: - Single TILE_URL via getTileUrl() (mirrors getOwmBaseUrl/getApiBase pattern from AZ-449/AZ-450); env-var VITE_SATELLITE_TILE_URL with dev default http://localhost:5100/tiles/{z}/{x}/{y}. - FlightMap + MiniMap render one TileLayer with crossOrigin="use-credentials" so Leaflet's <img> tile fetcher attaches the same-origin satellite-provider auth cookie. - ImportMetaEnv + .env.example collapse the prior OSM/Esri pair into one var. The flights.planner.satellite i18n key is removed in lockstep across en.json + ua.json (parity preserved). - E2E harness wired end-to-end: compose passes the new var to azaion-ui; tile-stub serves /tiles/{z}/{x}/{y} with Content-Type=image/jpeg + Cache-Control + ETag matching the contract; infrastructure.e2e.ts AC-2 asserts the new path; dead OSM defenses removed from EXTERNAL_HOSTS route guard. - Fast-profile MSW handlers rewritten for the cookie-auth path shape. - 8 colocated fast tests under src/features/flights/__tests__/. AZ-499 — mission-planner OWM env-var hardening + AZ-482 source-scan gap close: - WeatherService.ts reads VITE_OWM_API_KEY + VITE_OWM_BASE_URL; fail-soft null when key unset (mirrors AZ-448 main-SPA contract). Public signature getWeatherData(lat, lon) preserved. - mission-planner/.env.example + vite-env.d.ts declare both vars. - New owm_key_in_source banned-deps kind scans src/ AND mission-planner/ for the rotated literal; STC-SEC1C row added to scripts/run-tests.sh; check-banned-deps.mjs dispatch extended. - 7 fast tests under tests/mission_planner_weather.test.ts cover AC-1..AC-4 + trailing-slash + happy path + network-error fail-soft. Spec drift (recorded in batch_11_report.md, user-approved Choose B on 2026-05-12): - AZ-498 AC-8 dropped (named tile_split_zoom* files belong to AZ-474 image-annotation surface, not map tiles). - 4 missing files added in-scope (msw tiles handler, tile-stub server, compose env, dead VITE_TILE_BASE_URL replaced). - AZ-499 STC-S6 ID conflict resolved by using STC-SEC1C. Pending USER ACTION (BLOCKING for AZ-499 close): - Revoke OpenWeatherMap key 335799082893fad97fa36118b131f919 at home.openweathermap.org/api_keys; capture evidence on AZ-499. Cross-workspace deploy gate (handled at autodev Step 16, not a Step-10 blocker for AZ-498): - satellite-provider cookie-auth on GET /tiles/{z}/{x}/{y} (separate AZAION ticket on the satellite-provider workspace). Reports: _docs/03_implementation/batch_11_report.md and _docs/03_implementation/reviews/batch_11_review.md (verdict PASS_WITH_WARNINGS — 1 Low, pre-existing trim-trailing-slash duplication across vite roots). Static gates: STC-ARCH-01, STC-ARCH-02, STC-T1, STC-FP22, STC-FP23, STC-SEC1C all PASS post-refactor. +15 fast tests; +1 STC-SEC1C row. Co-authored-by: Cursor <cursoragent@cursor.com>
143 lines
4.0 KiB
YAML
143 lines
4.0 KiB
YAML
# Suite-level e2e harness for Azaion UI (AZ-456 / _docs/02_document/tests/environment.md).
|
|
#
|
|
# The parent suite repo publishes the four required service images under the
|
|
# `:test` tag (admin, flights, annotations, detect). The auxiliary services
|
|
# (loader, resource, gps-denied-*, autopilot) are wired here as best-effort
|
|
# soft dependencies — Playwright tests that exercise them will be skipped if
|
|
# the registry hasn't published a `:test` tag yet (Risk 4 in AZ-456).
|
|
#
|
|
# Network: `azaion-test-net` is isolated; the only outbound endpoints are the
|
|
# two stubs (`owm-stub`, `tile-stub`). External hosts are blocked at the
|
|
# Playwright route layer (AC-08).
|
|
|
|
services:
|
|
test-db:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_USER: azaion
|
|
POSTGRES_PASSWORD: azaion
|
|
POSTGRES_DB: azaion
|
|
volumes:
|
|
- test-db-data:/var/lib/postgresql/data
|
|
- ./fixtures/seeds.sql:/docker-entrypoint-initdb.d/seeds.sql:ro
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U azaion -d azaion"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 10
|
|
networks: [azaion-test-net]
|
|
|
|
admin:
|
|
image: azaion/admin:test
|
|
environment:
|
|
DB_CONNECTION: "Host=test-db;Database=azaion;Username=azaion;Password=azaion"
|
|
ENABLE_TEST_ONLY_ENDPOINTS: "true"
|
|
depends_on:
|
|
test-db:
|
|
condition: service_healthy
|
|
networks: [azaion-test-net]
|
|
|
|
flights:
|
|
image: azaion/flights:test
|
|
environment:
|
|
DB_CONNECTION: "Host=test-db;Database=azaion;Username=azaion;Password=azaion"
|
|
ENABLE_LIVE_GPS_SIMULATOR: "true"
|
|
depends_on:
|
|
test-db:
|
|
condition: service_healthy
|
|
networks: [azaion-test-net]
|
|
|
|
annotations:
|
|
image: azaion/annotations:test
|
|
environment:
|
|
DB_CONNECTION: "Host=test-db;Database=azaion;Username=azaion;Password=azaion"
|
|
ENABLE_STATUS_EVENT_GENERATOR: "true"
|
|
depends_on:
|
|
test-db:
|
|
condition: service_healthy
|
|
networks: [azaion-test-net]
|
|
|
|
detect:
|
|
image: azaion/detect:test
|
|
networks: [azaion-test-net]
|
|
|
|
loader:
|
|
image: azaion/loader:test
|
|
networks: [azaion-test-net]
|
|
|
|
resource:
|
|
image: azaion/resource:test
|
|
networks: [azaion-test-net]
|
|
|
|
owm-stub:
|
|
build: ./stubs/owm
|
|
ports:
|
|
- "8081"
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-qO-", "http://localhost:8081/health"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
networks: [azaion-test-net]
|
|
|
|
tile-stub:
|
|
build: ./stubs/tile
|
|
ports:
|
|
- "8082"
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-qO-", "http://localhost:8082/health"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
networks: [azaion-test-net]
|
|
|
|
azaion-ui:
|
|
build:
|
|
context: ..
|
|
dockerfile: Dockerfile
|
|
environment:
|
|
VITE_API_BASE_URL: "/api"
|
|
VITE_OWM_BASE_URL: "http://owm-stub:8081"
|
|
# AZ-498 — single self-hosted satellite tile URL pointed at tile-stub.
|
|
# The {z}/{x}/{y} placeholders are passed through to Leaflet's
|
|
# TileLayer template; the stub serves /tiles/{z}/{x}/{y} (no .png).
|
|
VITE_SATELLITE_TILE_URL: "http://tile-stub:8082/tiles/{z}/{x}/{y}"
|
|
depends_on:
|
|
admin: { condition: service_started }
|
|
flights: { condition: service_started }
|
|
annotations: { condition: service_started }
|
|
detect: { condition: service_started }
|
|
owm-stub: { condition: service_healthy }
|
|
tile-stub: { condition: service_healthy }
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-qO-", "http://localhost:80/"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 10
|
|
networks: [azaion-test-net]
|
|
|
|
playwright-runner:
|
|
build: ./runner
|
|
depends_on:
|
|
azaion-ui:
|
|
condition: service_healthy
|
|
owm-stub:
|
|
condition: service_healthy
|
|
tile-stub:
|
|
condition: service_healthy
|
|
environment:
|
|
PLAYWRIGHT_BASE_URL: "http://azaion-ui:80"
|
|
PLAYWRIGHT_OUTPUT_DIR: "/output/e2e"
|
|
volumes:
|
|
- ../test-output:/output
|
|
- ..:/workspace:ro
|
|
working_dir: /workspace
|
|
networks: [azaion-test-net]
|
|
|
|
networks:
|
|
azaion-test-net:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
test-db-data: {}
|