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

@@ -25,15 +25,13 @@ import type { SaveCredentialFunction } from '../integration/shared/types';
import { User } from '@/databases/entities/User';
import { SharedWorkflow } from '@/databases/entities/SharedWorkflow';
let testDbName = '';
let mockNodeTypes: INodeTypes;
let credentialOwnerRole: Role;
let workflowOwnerRole: Role;
let saveCredential: SaveCredentialFunction;
beforeAll(async () => {
const initResult = await testDb.init();
testDbName = initResult.testDbName;
await testDb.init();
mockNodeTypes = MockNodeTypes({
loaded: {
@@ -51,12 +49,12 @@ beforeAll(async () => {
});
beforeEach(async () => {
await testDb.truncate(['SharedWorkflow', 'SharedCredentials'], testDbName);
await testDb.truncate(['User', 'Workflow', 'Credentials'], testDbName);
await testDb.truncate(['SharedWorkflow', 'SharedCredentials']);
await testDb.truncate(['User', 'Workflow', 'Credentials']);
});
afterAll(async () => {
await testDb.terminate(testDbName);
await testDb.terminate();
});
describe('PermissionChecker.check()', () => {