chore: more tests

This commit is contained in:
Nathnael
2026-07-21 12:49:36 +00:00
parent b8b8c4adf7
commit 20a6ef7906
11 changed files with 609 additions and 22 deletions

View File

@@ -8,8 +8,9 @@
# Interactive from host: pnpm --filter @edr/freight-e2e cy:open
# Teardown: docker compose -f docker-compose.e2e.yaml down -v --remove-orphans
#
# Host ports (chosen to never collide with the dev stack):
# freight-api 3101 portal 5273 backoffice 5283
# Host ports (chosen to never collide with the dev stacks — 5273/5283/3221 are
# taken by the second dev checkout in ~/projects/nathnael/edr-platform):
# freight-api 3101 portal 5373 backoffice 5383
# postgres 5533 minio 9310 (console 9311)
name: edr-freight-e2e
@@ -47,6 +48,18 @@ services:
timeout: 5s
retries: 12
# tmpfs wipes MinIO on every restart — recreate the app bucket each boot.
minio-init-e2e:
image: minio/mc:latest
depends_on:
minio-e2e:
condition: service_healthy
entrypoint:
- /bin/sh
- -c
- mc alias set e2e http://minio-e2e:9000 e2e-minio e2e-minio-secret && mc mb --ignore-existing e2e/fhc
restart: "no"
freight-api-e2e:
build:
context: .
@@ -58,6 +71,8 @@ services:
condition: service_healthy
minio-e2e:
condition: service_healthy
minio-init-e2e:
condition: service_completed_successfully
environment:
PORT: "3001"
DB_HOST: postgres-freight-e2e
@@ -89,7 +104,10 @@ services:
# External integrations off
RABBITMQ_ENABLED: "false"
FAYDA_ENABLED: "false"
FREIGHT_PORTAL_URL: http://localhost:5273
# SMS strategy has no kill switch and defaults to a real dev endpoint —
# blackhole it so e2e never sends SMS (failures are logged, non-fatal).
OZIKING_SMS_URL: http://127.0.0.1:9/sms
FREIGHT_PORTAL_URL: http://localhost:5373
ports:
- "3101:3001"
healthcheck:
@@ -124,7 +142,7 @@ services:
secrets:
- npmrc
ports:
- "5273:80"
- "5373:80"
freight-backoffice-e2e:
build:
@@ -142,7 +160,7 @@ services:
secrets:
- npmrc
ports:
- "5283:80"
- "5383:80"
# Headless runner — opt-in via `--profile cypress`. host network so the
# in-container browser uses the exact same localhost URLs as `cypress open`