mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-17 18:35:19 +02:00
chore: implement test-only token mint endpoint and update E2E test authentication flow
This commit is contained in:
parent
741d6e7eea
commit
b247ff37df
8 changed files with 344 additions and 170 deletions
8
.github/workflows/e2e-tests.yml
vendored
8
.github/workflows/e2e-tests.yml
vendored
|
|
@ -30,6 +30,9 @@ jobs:
|
|||
# spawns `pnpm build && pnpm start` in CI; these get baked into the build.
|
||||
NEXT_PUBLIC_FASTAPI_BACKEND_URL: http://localhost:8000
|
||||
NEXT_PUBLIC_FASTAPI_BACKEND_AUTH_TYPE: LOCAL
|
||||
# Shared secret for the test-only POST /__e2e__/auth/token endpoint.
|
||||
# Must match docker-compose.e2e.yml's backend env (x-backend-env).
|
||||
E2E_MINT_SECRET: e2e-mint-secret-not-for-production
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
|
@ -65,6 +68,11 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Flush auth rate-limit counters so Playwright starts clean.
|
||||
docker compose -f docker/docker-compose.e2e.yml exec -T redis \
|
||||
sh -c "redis-cli --scan --pattern 'surfsense:auth_rate_limit:*' \
|
||||
| xargs -r redis-cli DEL" || true
|
||||
|
||||
# ─── Frontend (host-side) ──────────────────────────────────────────
|
||||
# Playwright's webServer block in playwright.config.ts spawns
|
||||
# `pnpm build && pnpm start` in CI mode and waits for :3000.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue