mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +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
@@ -6,6 +6,8 @@ import { mockInstance } from '../shared/utils/';
|
||||
import { InternalHooks } from '@/InternalHooks';
|
||||
import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
|
||||
import { NodeTypes } from '@/NodeTypes';
|
||||
import { getGlobalOwnerRole } from '../shared/db/roles';
|
||||
import { createUser } from '../shared/db/users';
|
||||
|
||||
let globalOwnerRole: Role;
|
||||
|
||||
@@ -15,7 +17,7 @@ beforeAll(async () => {
|
||||
mockInstance(NodeTypes);
|
||||
await testDb.init();
|
||||
|
||||
globalOwnerRole = await testDb.getGlobalOwnerRole();
|
||||
globalOwnerRole = await getGlobalOwnerRole();
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
@@ -28,7 +30,7 @@ afterAll(async () => {
|
||||
|
||||
// eslint-disable-next-line n8n-local-rules/no-skipped-tests
|
||||
test.skip('user-management:reset should reset DB to default user state', async () => {
|
||||
await testDb.createUser({ globalRole: globalOwnerRole });
|
||||
await createUser({ globalRole: globalOwnerRole });
|
||||
|
||||
await Reset.run();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user