- In this PR the default value of IS_CONFIG_VARIABLES_IN_DB_ENABLED has
been changed to true,
- This is my first time writing integration tests, so I’d appreciate a
thorough review. :)
I’ve tried to follow the existing test patterns closely, but there might
be some small mistakes I may have missed.
Also let me know if I have missed any important test cases that should
be tested
UPDATE -
### Config Value Converter Refactoring
- Created a centralized type transformers registry with bidirectional
validation
- Refactored ConfigValueConverterService to support validation in both
directions:
- Maintained existing DB-to-app conversion behavior
- Added validation for app-to-DB conversion
- Added integration tests to verify validation works in both directions
---------
Co-authored-by: Félix Malfait <felix@twenty.com>
17 lines
760 B
TypeScript
17 lines
760 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 = 'EMAIL_FROM_NAME';
|