- Remove `type` keyword from NestJS injectable class imports across all modules to fix runtime DI resolution (330+ handler/listener files) - Offset CI docker-compose ports (5433/6380/8109/9002) to avoid conflicts with running dev containers - Update .env.test, playwright.config.ts, and e2e workflow to use isolated CI ports with configurable overrides - Fix prisma/seed.ts to use deterministic IDs for Prisma 7 upsert compatibility (phoneHash replaced phone as unique index) - Add dedicated Docker bridge network for CI service containers Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
69 lines
2.4 KiB
Plaintext
69 lines
2.4 KiB
Plaintext
# =============================================================================
|
|
# GoodGo Platform — Test Environment Variables
|
|
# Used by E2E tests (Playwright globalSetup loads this automatically)
|
|
#
|
|
# These values MUST match docker-compose.ci.yml service credentials.
|
|
# Ports use CI_* offsets to avoid conflicts with dev containers.
|
|
# =============================================================================
|
|
|
|
# Test database — matches docker-compose.ci.yml postgres service
|
|
# Port 5433 avoids conflict with dev postgres on 5432
|
|
DATABASE_URL=postgresql://goodgo:goodgo_test_secret@localhost:5433/goodgo_test?schema=public
|
|
|
|
# Redis — matches docker-compose.ci.yml redis service
|
|
# Port 6380 avoids conflict with dev redis on 6379
|
|
REDIS_URL=redis://localhost:6380
|
|
REDIS_HOST=localhost
|
|
REDIS_PORT=6380
|
|
|
|
# Typesense — matches docker-compose.ci.yml typesense service
|
|
# Port 8109 avoids conflict with dev typesense on 8108
|
|
TYPESENSE_HOST=localhost
|
|
TYPESENSE_PORT=8109
|
|
TYPESENSE_PROTOCOL=http
|
|
TYPESENSE_API_KEY=ts_ci_key
|
|
|
|
# MinIO — matches docker-compose.ci.yml minio service
|
|
# Port 9002 avoids conflict with dev minio on 9000
|
|
MINIO_ENDPOINT=localhost
|
|
MINIO_PORT=9002
|
|
MINIO_ACCESS_KEY=ci_minio_user
|
|
MINIO_SECRET_KEY=ci_minio_secret_key_32chars!!
|
|
MINIO_BUCKET=goodgo-uploads
|
|
|
|
# Auth (deterministic secrets for test reproducibility)
|
|
JWT_SECRET=e2e-test-jwt-secret-key-minimum-32-chars-long-enough
|
|
JWT_REFRESH_SECRET=e2e-test-refresh-secret-key-minimum-32-chars-ok
|
|
JWT_EXPIRES_IN=15m
|
|
JWT_REFRESH_EXPIRES_IN=7d
|
|
NODE_ENV=test
|
|
|
|
# Server ports — offset to avoid conflicts with dev
|
|
API_PORT=3011
|
|
WEB_PORT=3010
|
|
API_BASE_URL=http://localhost:3011/api/v1/
|
|
WEB_BASE_URL=http://localhost:3010
|
|
|
|
# Bcrypt (fast rounds for test — production uses 12+)
|
|
BCRYPT_ROUNDS=4
|
|
|
|
# OAuth (test stubs)
|
|
GOOGLE_CLIENT_ID=test-google-client-id
|
|
GOOGLE_CLIENT_SECRET=test-google-client-secret
|
|
GOOGLE_CALLBACK_URL=http://localhost:3001/api/v1/auth/google/callback
|
|
ZALO_APP_ID=test-zalo-app-id
|
|
ZALO_APP_SECRET=test-zalo-app-secret
|
|
ZALO_CALLBACK_URL=http://localhost:3001/api/v1/auth/zalo/callback
|
|
|
|
# Payment (sandbox)
|
|
VNPAY_TMN_CODE=TESTCODE
|
|
VNPAY_HASH_SECRET=TESTHASHSECRETTESTHASHSECRETTEST
|
|
VNPAY_URL=https://sandbox.vnpayment.vn/paymentv2/vpcpay.html
|
|
VNPAY_RETURN_URL=http://localhost:3000/payment/return
|
|
MOMO_PARTNER_CODE=TEST_MOMO_PARTNER
|
|
MOMO_ACCESS_KEY=TEST_MOMO_ACCESS_KEY
|
|
MOMO_SECRET_KEY=TEST_MOMO_SECRET_KEY
|
|
ZALOPAY_APP_ID=TEST_ZALOPAY_APP
|
|
ZALOPAY_KEY1=TEST_ZALOPAY_KEY1
|
|
ZALOPAY_KEY2=TEST_ZALOPAY_KEY2
|