mirror of
https://github.com/n8n-io/n8n.git
synced 2026-05-29 15:57:00 +02:00
fix(core): Schema parsing bypassing config key assignment (#14556)
This commit is contained in:
parent
8c352293b5
commit
d390258001
|
|
@ -50,6 +50,7 @@ export const Config: ClassDecorator = (ConfigClass: Class) => {
|
|||
);
|
||||
continue;
|
||||
}
|
||||
config[key] = result.data;
|
||||
} else if (type === Number) {
|
||||
const parsed = Number(value);
|
||||
if (isNaN(parsed)) {
|
||||
|
|
|
|||
|
|
@ -404,6 +404,8 @@ describe('GlobalConfig', () => {
|
|||
it('on invalid value, should warn and fall back to default value', () => {
|
||||
process.env = {
|
||||
N8N_RUNNERS_MODE: 'non-existing-mode',
|
||||
N8N_RUNNERS_ENABLED: 'true',
|
||||
DB_TYPE: 'postgresdb',
|
||||
};
|
||||
|
||||
const globalConfig = Container.get(GlobalConfig);
|
||||
|
|
@ -413,6 +415,9 @@ describe('GlobalConfig', () => {
|
|||
"Invalid value for N8N_RUNNERS_MODE - Invalid enum value. Expected 'internal' | 'external', received 'non-existing-mode'. Falling back to default value.",
|
||||
),
|
||||
);
|
||||
|
||||
expect(globalConfig.taskRunners.enabled).toEqual(true);
|
||||
expect(globalConfig.database.type).toEqual('postgresdb');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user