refactor(core): Move backend config to a separate package (no-changelog) (#9325)
This commit is contained in:
committed by
GitHub
parent
1d5b9836ca
commit
c7d4b471c4
@@ -1,3 +1,5 @@
|
||||
import { Container } from 'typedi';
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import type { IRun, WorkflowExecuteMode } from 'n8n-workflow';
|
||||
import {
|
||||
QueryFailedError,
|
||||
@@ -19,11 +21,12 @@ import { mockInstance } from '../../shared/mocking';
|
||||
import type { Project } from '@/databases/entities/Project';
|
||||
|
||||
describe('EventsService', () => {
|
||||
const dbType = config.getEnv('database.type');
|
||||
const fakeUser = mock<User>({ id: 'abcde-fghij' });
|
||||
const fakeProject = mock<Project>({ id: '12345-67890', type: 'personal' });
|
||||
const ownershipService = mockInstance(OwnershipService);
|
||||
const userService = mockInstance(UserService);
|
||||
const globalConfig = Container.get(GlobalConfig);
|
||||
const dbType = globalConfig.database.type;
|
||||
|
||||
const entityManager = mock<EntityManager>();
|
||||
const dataSource = mock<DataSource>({
|
||||
@@ -43,7 +46,7 @@ describe('EventsService', () => {
|
||||
|
||||
const eventsService = new EventsService(
|
||||
mock(),
|
||||
new WorkflowStatisticsRepository(dataSource),
|
||||
new WorkflowStatisticsRepository(dataSource, globalConfig),
|
||||
ownershipService,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user