|
@@ -1,5 +1,5 @@
|
|
|
import { IntegrationTestDatabase } from '@d8d/shared-test-util';
|
|
import { IntegrationTestDatabase } from '@d8d/shared-test-util';
|
|
|
-import { File } from '../../src/entities';
|
|
|
|
|
|
|
+import { FileMt } from '../../src/entities';
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 集成测试断言工具
|
|
* 集成测试断言工具
|
|
@@ -45,7 +45,7 @@ export class IntegrationTestAssertions {
|
|
|
throw new Error('Database not initialized');
|
|
throw new Error('Database not initialized');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const fileRepository = dataSource.getRepository(File);
|
|
|
|
|
|
|
+ const fileRepository = dataSource.getRepository(FileMt);
|
|
|
const file = await fileRepository.findOne({ where: { name } });
|
|
const file = await fileRepository.findOne({ where: { name } });
|
|
|
|
|
|
|
|
if (!file) {
|
|
if (!file) {
|
|
@@ -62,7 +62,7 @@ export class IntegrationTestAssertions {
|
|
|
throw new Error('Database not initialized');
|
|
throw new Error('Database not initialized');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const fileRepository = dataSource.getRepository(File);
|
|
|
|
|
|
|
+ const fileRepository = dataSource.getRepository(FileMt);
|
|
|
const file = await fileRepository.findOne({ where: { name } });
|
|
const file = await fileRepository.findOne({ where: { name } });
|
|
|
|
|
|
|
|
if (file) {
|
|
if (file) {
|
|
@@ -79,7 +79,7 @@ export class IntegrationTestAssertions {
|
|
|
throw new Error('Database not initialized');
|
|
throw new Error('Database not initialized');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const fileRepository = dataSource.getRepository(File);
|
|
|
|
|
|
|
+ const fileRepository = dataSource.getRepository(FileMt);
|
|
|
const file = await fileRepository.findOne({ where: { id } });
|
|
const file = await fileRepository.findOne({ where: { id } });
|
|
|
|
|
|
|
|
if (!file) {
|
|
if (!file) {
|
|
@@ -96,7 +96,7 @@ export class IntegrationTestAssertions {
|
|
|
throw new Error('Database not initialized');
|
|
throw new Error('Database not initialized');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- const fileRepository = dataSource.getRepository(File);
|
|
|
|
|
|
|
+ const fileRepository = dataSource.getRepository(FileMt);
|
|
|
const file = await fileRepository.findOne({ where: { id } });
|
|
const file = await fileRepository.findOne({ where: { id } });
|
|
|
|
|
|
|
|
if (file) {
|
|
if (file) {
|