mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +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,6 +1,7 @@
|
||||
import type { SuperAgentTest } from 'supertest';
|
||||
import * as testDb from './shared/testDb';
|
||||
import * as utils from './shared/utils/';
|
||||
import { getGlobalMemberRole } from './shared/db/roles';
|
||||
import { createUser } from './shared/db/users';
|
||||
|
||||
describe('Auth Middleware', () => {
|
||||
const testServer = utils.setupTestServer({ endpointGroups: ['me', 'auth', 'owner', 'users'] });
|
||||
@@ -36,8 +37,8 @@ describe('Auth Middleware', () => {
|
||||
describe('Routes requiring Authorization', () => {
|
||||
let authMemberAgent: SuperAgentTest;
|
||||
beforeAll(async () => {
|
||||
const globalMemberRole = await testDb.getGlobalMemberRole();
|
||||
const member = await testDb.createUser({ globalRole: globalMemberRole });
|
||||
const globalMemberRole = await getGlobalMemberRole();
|
||||
const member = await createUser({ globalRole: globalMemberRole });
|
||||
authMemberAgent = testServer.authAgentFor(member);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user