Root cause: the ci.yml e2e job had JWT_SECRET (23 chars) and
JWT_REFRESH_SECRET (27 chars), both below the MIN_SECRET_LENGTH=32
enforced by env-validation.ts. The API webServer refused to start with
"Insecure JWT secret configuration", so every E2E test failed with
ERR_CONNECTION_REFUSED before a single assertion ran.
Fixes in this commit:
1. .github/workflows/ci.yml — sync e2e job env with the working
standalone e2e.yml:
• JWT secrets lengthened past 32-char minimum
• Add API_PORT / WEB_PORT / *_BASE_URL for Playwright webServer
• Add REDIS_HOST/PORT, TYPESENSE_PROTOCOL, JWT_EXPIRES_IN,
BCRYPT_ROUNDS, GOOGLE_*/ZALO_* OAuth stubs
• VNPAY_HASH_SECRET lengthened to 32 chars
• MINIO creds use vars fallback pattern (matches e2e.yml)
2. phone-login-otp-requested.event.ts + .listener.ts — the notifications
module imported PhoneLoginOtpRequestedListener but neither the event
class nor the listener file existed, causing module-resolution errors
in four unrelated test suites that import notifications.module.ts.
3. create-payment.handler.spec.ts — inject mockSbvCompliance so the two
handler tests that were TypeError-ing on undefined.error() pass.
Co-Authored-By: Paperclip <noreply@paperclip.ing>
8.5 KiB
8.5 KiB