refactor(core): Use DI for eventBus code - Part 1 (no-changelog) (#8434)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-01-26 12:21:15 +01:00
committed by GitHub
parent 3cc0f81c02
commit 7c49004018
19 changed files with 399 additions and 355 deletions

View File

@@ -1,7 +1,12 @@
import type { SuperAgentTest } from 'supertest';
import * as utils from './shared/utils/';
import type { User } from '@db/entities/User';
import { MessageEventBus } from '@/eventbus';
import { ExecutionDataRecoveryService } from '@/eventbus/executionDataRecovery.service';
import * as utils from './shared/utils/';
import { createUser } from './shared/db/users';
import { mockInstance } from '../shared/mocking';
/**
* NOTE: due to issues with mocking the MessageEventBus in multiple tests running in parallel,
@@ -12,6 +17,8 @@ import { createUser } from './shared/db/users';
let owner: User;
let authOwnerAgent: SuperAgentTest;
mockInstance(MessageEventBus);
mockInstance(ExecutionDataRecoveryService);
const testServer = utils.setupTestServer({
endpointGroups: ['eventBus'],
enabledFeatures: [], // do not enable logstreaming