mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
refactor: Upgrade typeorm to 0.3.x (#5151)
This commit is contained in:
committed by
GitHub
parent
6608e69457
commit
0a5ab560b1
@@ -9,14 +9,12 @@ import * as utils from '../shared/utils';
|
||||
import * as testDb from '../shared/testDb';
|
||||
|
||||
let app: express.Application;
|
||||
let testDbName = '';
|
||||
let globalOwnerRole: Role;
|
||||
let workflowRunner: ActiveWorkflowRunner;
|
||||
|
||||
beforeAll(async () => {
|
||||
app = await utils.initTestServer({ endpointGroups: ['publicApi'], applyAuth: false });
|
||||
const initResult = await testDb.init();
|
||||
testDbName = initResult.testDbName;
|
||||
await testDb.init();
|
||||
|
||||
globalOwnerRole = await testDb.getGlobalOwnerRole();
|
||||
|
||||
@@ -30,18 +28,15 @@ beforeAll(async () => {
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await testDb.truncate(
|
||||
[
|
||||
'SharedCredentials',
|
||||
'SharedWorkflow',
|
||||
'User',
|
||||
'Workflow',
|
||||
'Credentials',
|
||||
'Execution',
|
||||
'Settings',
|
||||
],
|
||||
testDbName,
|
||||
);
|
||||
await testDb.truncate([
|
||||
'SharedCredentials',
|
||||
'SharedWorkflow',
|
||||
'User',
|
||||
'Workflow',
|
||||
'Credentials',
|
||||
'Execution',
|
||||
'Settings',
|
||||
]);
|
||||
|
||||
config.set('userManagement.disabled', false);
|
||||
config.set('userManagement.isInstanceOwnerSetUp', true);
|
||||
@@ -52,7 +47,7 @@ afterEach(async () => {
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await testDb.terminate(testDbName);
|
||||
await testDb.terminate();
|
||||
});
|
||||
|
||||
test('GET /executions/:id should fail due to missing API Key', async () => {
|
||||
|
||||
Reference in New Issue
Block a user