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
@@ -5,6 +5,8 @@ import type { ILicensePostResponse, ILicenseReadResponse } from '@/Interfaces';
|
||||
import { License } from '@/License';
|
||||
import * as testDb from './shared/testDb';
|
||||
import * as utils from './shared/utils/';
|
||||
import { getGlobalMemberRole, getGlobalOwnerRole } from './shared/db/roles';
|
||||
import { createUserShell } from './shared/db/users';
|
||||
|
||||
const MOCK_SERVER_URL = 'https://server.com/v1';
|
||||
const MOCK_RENEW_OFFSET = 259200;
|
||||
@@ -17,10 +19,10 @@ let authMemberAgent: SuperAgentTest;
|
||||
const testServer = utils.setupTestServer({ endpointGroups: ['license'] });
|
||||
|
||||
beforeAll(async () => {
|
||||
const globalOwnerRole = await testDb.getGlobalOwnerRole();
|
||||
const globalMemberRole = await testDb.getGlobalMemberRole();
|
||||
owner = await testDb.createUserShell(globalOwnerRole);
|
||||
member = await testDb.createUserShell(globalMemberRole);
|
||||
const globalOwnerRole = await getGlobalOwnerRole();
|
||||
const globalMemberRole = await getGlobalMemberRole();
|
||||
owner = await createUserShell(globalOwnerRole);
|
||||
member = await createUserShell(globalMemberRole);
|
||||
|
||||
authOwnerAgent = testServer.authAgentFor(owner);
|
||||
authMemberAgent = testServer.authAgentFor(member);
|
||||
|
||||
Reference in New Issue
Block a user