mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
refactor(core): Simplify OrchestrationService (no-changelog) (#8364)
This commit is contained in:
@@ -7,6 +7,7 @@ import type { WorkflowEntity } from '@/databases/entities/WorkflowEntity';
|
||||
import { setupTestServer } from './shared/utils';
|
||||
import type { SuperAgentTest } from 'supertest';
|
||||
import { createOwner } from './shared/db/users';
|
||||
import { OrchestrationService } from '@/services/orchestration.service';
|
||||
import { MultiMainSetup } from '@/services/orchestration/main/MultiMainSetup.ee';
|
||||
|
||||
describe('DebugController', () => {
|
||||
@@ -36,9 +37,9 @@ describe('DebugController', () => {
|
||||
activeWorkflowRunner.allActiveInMemory.mockReturnValue([workflowId]);
|
||||
activeWorkflowRunner.getAllWorkflowActivationErrors.mockResolvedValue(activationErrors);
|
||||
|
||||
jest.spyOn(MultiMainSetup.prototype, 'instanceId', 'get').mockReturnValue(instanceId);
|
||||
jest.spyOn(OrchestrationService.prototype, 'instanceId', 'get').mockReturnValue(instanceId);
|
||||
jest.spyOn(MultiMainSetup.prototype, 'fetchLeaderKey').mockResolvedValue(leaderKey);
|
||||
jest.spyOn(MultiMainSetup.prototype, 'isLeader', 'get').mockReturnValue(true);
|
||||
jest.spyOn(OrchestrationService.prototype, 'isLeader', 'get').mockReturnValue(true);
|
||||
|
||||
const response = await ownerAgent.get('/debug/multi-main-setup').expect(200);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user