mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor: Delete a lot of unused and duplicate code in Server and WebhookServer (#5080)
* store n8n version string in a const and use that everywhere * reduce code duplication between Server and WebhookServer * unify redis checks * fix linting
This commit is contained in:
committed by
GitHub
parent
b67f803cbe
commit
8b19fdd5f0
@@ -6,13 +6,11 @@ import * as testDb from './shared/testDb';
|
||||
import type { AuthAgent } from './shared/types';
|
||||
import * as utils from './shared/utils';
|
||||
import { ILicensePostResponse, ILicenseReadResponse } from '@/Interfaces';
|
||||
import { LicenseManager } from '@n8n_io/license-sdk';
|
||||
import { License } from '@/License';
|
||||
|
||||
const MOCK_SERVER_URL = 'https://server.com/v1';
|
||||
const MOCK_RENEW_OFFSET = 259200;
|
||||
const MOCK_INSTANCE_ID = 'instance-id';
|
||||
const MOCK_N8N_VERSION = '0.27.0';
|
||||
|
||||
let app: express.Application;
|
||||
let testDbName = '';
|
||||
@@ -41,7 +39,7 @@ beforeAll(async () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
license = new License();
|
||||
await license.init(MOCK_INSTANCE_ID, MOCK_N8N_VERSION);
|
||||
await license.init(MOCK_INSTANCE_ID);
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
|
||||
Reference in New Issue
Block a user