mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
ci(core): Reduce memory usage in tests (part-1) (no-changelog) (#7654)
This commit is contained in:
committed by
GitHub
parent
6a53c2a375
commit
0346b211a7
@@ -1,8 +1,9 @@
|
||||
import type { SuperAgentTest } from 'supertest';
|
||||
import * as utils from './shared/utils/';
|
||||
import * as testDb from './shared/testDb';
|
||||
import type { Role } from '@db/entities/Role';
|
||||
import type { User } from '@db/entities/User';
|
||||
import { getGlobalOwnerRole } from './shared/db/roles';
|
||||
import { createUser } from './shared/db/users';
|
||||
|
||||
/**
|
||||
* NOTE: due to issues with mocking the MessageEventBus in multiple tests running in parallel,
|
||||
@@ -20,8 +21,8 @@ const testServer = utils.setupTestServer({
|
||||
});
|
||||
|
||||
beforeAll(async () => {
|
||||
globalOwnerRole = await testDb.getGlobalOwnerRole();
|
||||
owner = await testDb.createUser({ globalRole: globalOwnerRole });
|
||||
globalOwnerRole = await getGlobalOwnerRole();
|
||||
owner = await createUser({ globalRole: globalOwnerRole });
|
||||
authOwnerAgent = testServer.authAgentFor(owner);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user