test(core): Stop showing JWT warning during test runs (no-changelog) (#10255)

This commit is contained in:
Iván Ovejero 2024-07-31 11:53:26 +02:00 committed by GitHub
parent 519fc4d753
commit efee25ddaa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -96,9 +96,10 @@ config.validate({
});
const userManagement = config.get('userManagement');
if (userManagement.jwtRefreshTimeoutHours >= userManagement.jwtSessionDurationHours) {
console.warn(
'N8N_USER_MANAGEMENT_JWT_REFRESH_TIMEOUT_HOURS needs to smaller than N8N_USER_MANAGEMENT_JWT_DURATION_HOURS. Setting N8N_USER_MANAGEMENT_JWT_REFRESH_TIMEOUT_HOURS to 0 for now.',
);
if (!inTest)
console.warn(
'N8N_USER_MANAGEMENT_JWT_REFRESH_TIMEOUT_HOURS needs to smaller than N8N_USER_MANAGEMENT_JWT_DURATION_HOURS. Setting N8N_USER_MANAGEMENT_JWT_REFRESH_TIMEOUT_HOURS to 0 for now.',
);
config.set('userManagement.jwtRefreshTimeoutHours', 0);
}