31 lines
941 B
TypeScript
31 lines
941 B
TypeScript
/**
|
|
* Integration Test Setup
|
|
*
|
|
* Configures the test environment for cross-feature integration tests.
|
|
* Sets environment variables and initializes test infrastructure.
|
|
*/
|
|
|
|
import 'reflect-metadata';
|
|
|
|
// Set test environment variables
|
|
process.env.NODE_ENV = 'test';
|
|
process.env.DISABLE_QUEUES = 'true';
|
|
process.env.LOG_LEVEL = 'warn';
|
|
|
|
// Test database configuration (will be overridden by testcontainers)
|
|
process.env.DATABASE_POSTGRES_USER = 'test_user';
|
|
process.env.DATABASE_POSTGRES_PASSWORD = 'test_password';
|
|
process.env.DATABASE_POSTGRES_NAME = 'integration_test';
|
|
|
|
// Test Redis configuration
|
|
process.env.REDIS_HOST = 'localhost';
|
|
process.env.REDIS_PORT = '26390';
|
|
|
|
// Disable external integrations
|
|
process.env.DISABLE_EXTERNAL_EMAIL = 'true';
|
|
process.env.DISABLE_WEBHOOKS = 'true';
|
|
|
|
// Test JWT secret
|
|
process.env.JWT_SECRET = 'test-jwt-secret-for-integration-tests';
|
|
|
|
console.log('✅ Integration test environment configured');
|