refactor: Upgrade typeorm to 0.3.x (#5151)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-01-13 18:12:22 +01:00
committed by GitHub
parent 6608e69457
commit 0a5ab560b1
85 changed files with 579 additions and 636 deletions

View File

@@ -9,7 +9,6 @@ import type { IPinData } from 'n8n-workflow';
import { makeWorkflow, MOCK_PINDATA } from './shared/utils';
let app: express.Application;
let testDbName = '';
let globalOwnerRole: Role;
// mock whether sharing is enabled or not
@@ -20,8 +19,7 @@ beforeAll(async () => {
endpointGroups: ['workflows'],
applyAuth: true,
});
const initResult = await testDb.init();
testDbName = initResult.testDbName;
await testDb.init();
globalOwnerRole = await testDb.getGlobalOwnerRole();
@@ -30,11 +28,11 @@ beforeAll(async () => {
});
beforeEach(async () => {
await testDb.truncate(['User', 'Workflow', 'SharedWorkflow'], testDbName);
await testDb.truncate(['User', 'Workflow', 'SharedWorkflow']);
});
afterAll(async () => {
await testDb.terminate(testDbName);
await testDb.terminate();
});
test('POST /workflows should store pin data for node in workflow', async () => {