mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
refactor(core): Move instanceType to InstanceSettings (no-changelog) (#10640)
This commit is contained in:
committed by
GitHub
parent
50beefb658
commit
25c8a328a8
@@ -1,3 +1,5 @@
|
||||
process.argv[2] = 'worker';
|
||||
|
||||
import { BinaryDataService } from 'n8n-core';
|
||||
|
||||
import { Worker } from '@/commands/worker';
|
||||
@@ -27,6 +29,7 @@ const logStreamingEventRelay = mockInstance(LogStreamingEventRelay);
|
||||
const orchestrationHandlerWorkerService = mockInstance(OrchestrationHandlerWorkerService);
|
||||
const scalingService = mockInstance(ScalingService);
|
||||
const orchestrationWorkerService = mockInstance(OrchestrationWorkerService);
|
||||
|
||||
const command = setupTestCommand(Worker);
|
||||
|
||||
test('worker initializes all its components', async () => {
|
||||
|
||||
@@ -7,12 +7,12 @@ import {
|
||||
} from 'n8n-workflow';
|
||||
import { agent as testAgent } from 'supertest';
|
||||
|
||||
import { AbstractServer } from '@/abstract-server';
|
||||
import type { WorkflowEntity } from '@/databases/entities/workflow-entity';
|
||||
import { ExternalHooks } from '@/external-hooks';
|
||||
import { NodeTypes } from '@/node-types';
|
||||
import { Push } from '@/push';
|
||||
import { Telemetry } from '@/telemetry';
|
||||
import { WebhookServer } from '@/webhooks/webhook-server';
|
||||
|
||||
import { createUser } from './shared/db/users';
|
||||
import { createWorkflow } from './shared/db/workflows';
|
||||
@@ -49,7 +49,7 @@ describe('Webhook API', () => {
|
||||
|
||||
await initActiveWorkflowManager();
|
||||
|
||||
const server = new (class extends AbstractServer {})();
|
||||
const server = new WebhookServer();
|
||||
await server.start();
|
||||
agent = testAgent(server.app);
|
||||
});
|
||||
@@ -152,7 +152,7 @@ describe('Webhook API', () => {
|
||||
|
||||
await initActiveWorkflowManager();
|
||||
|
||||
const server = new (class extends AbstractServer {})();
|
||||
const server = new WebhookServer();
|
||||
await server.start();
|
||||
agent = testAgent(server.app);
|
||||
});
|
||||
|
||||
@@ -4,12 +4,12 @@ import { agent as testAgent } from 'supertest';
|
||||
import type SuperAgentTest from 'supertest/lib/agent';
|
||||
import Container from 'typedi';
|
||||
|
||||
import { AbstractServer } from '@/abstract-server';
|
||||
import { ExternalHooks } from '@/external-hooks';
|
||||
import { WaitingForms } from '@/waiting-forms';
|
||||
import { LiveWebhooks } from '@/webhooks/live-webhooks';
|
||||
import { TestWebhooks } from '@/webhooks/test-webhooks';
|
||||
import { WaitingWebhooks } from '@/webhooks/waiting-webhooks';
|
||||
import { WebhookServer } from '@/webhooks/webhook-server';
|
||||
import type { IWebhookResponseCallbackData } from '@/webhooks/webhook.types';
|
||||
import { mockInstance } from '@test/mocking';
|
||||
|
||||
@@ -26,9 +26,9 @@ describe('WebhookServer', () => {
|
||||
mockInstance(WaitingForms);
|
||||
|
||||
beforeAll(async () => {
|
||||
const server = new (class extends AbstractServer {
|
||||
testWebhooksEnabled = true;
|
||||
})();
|
||||
const server = new WebhookServer();
|
||||
// @ts-expect-error: testWebhooksEnabled is private
|
||||
server.testWebhooksEnabled = true;
|
||||
await server.start();
|
||||
agent = testAgent(server.app);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user