Files
twenty/packages/twenty-server/test/integration/twenty-config/constants/config-test-keys.constants.ts
nitin 1c64b7b072 feat: implement dynamic driver configuration + fix integration test log pollution (#12104)
### Primary Changes: Dynamic Driver Configuration
Refactors FileStorageService and EmailSenderService to support dynamic
driver configuration changes at runtime without requiring application
restarts.

**Key Architectural Change**: Instead of conditionally registering
drivers at build time based on configuration, we now **register all
possible drivers eagerly** and select the appropriate one at runtime.

### What Changed:
- **Before**: Modules conditionally registered only the configured
driver (e.g., only S3Driver if STORAGE_TYPE=S3)
- **After**: All drivers (LocalDriver, S3Driver, SmtpDriver,
LoggerDriver) are registered at startup
- **Runtime Selection**: Services dynamically choose and instantiate the
correct driver based on current configuration

### Secondary Fix: Integration Test Log Cleanup
Addresses ConfigStorageService error logs appearing in integration test
output by using injected LoggerService for consistent log handling.
2025-05-28 14:19:20 +05:30

17 lines
771 B
TypeScript

import { ConfigVariables } from 'src/engine/core-modules/twenty-config/config-variables';
type ConfigKey = keyof ConfigVariables;
export const TEST_KEY_DEFAULT: ConfigKey = 'IS_ATTACHMENT_PREVIEW_ENABLED';
export const TEST_KEY_NOTIFICATION: ConfigKey =
'WORKSPACE_INACTIVE_DAYS_BEFORE_NOTIFICATION';
export const TEST_KEY_SOFT_DELETION: ConfigKey =
'WORKSPACE_INACTIVE_DAYS_BEFORE_SOFT_DELETION';
export const TEST_KEY_DELETION: ConfigKey =
'WORKSPACE_INACTIVE_DAYS_BEFORE_DELETION';
export const TEST_KEY_METRICS: ConfigKey =
'HEALTH_METRICS_TIME_WINDOW_IN_MINUTES';
export const TEST_KEY_ENV_ONLY: ConfigKey = 'PG_DATABASE_URL';
export const TEST_KEY_NONEXISTENT = 'NONEXISTENT_CONFIG_KEY';
export const TEST_KEY_STRING_VALUE: ConfigKey = 'EMAIL_FROM_NAME';