mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
Fixing failing Album tests #45
This commit is contained in:
parent
682c2e5c11
commit
a5630a2fe8
@ -4,7 +4,7 @@ import {columnCharsetCS} from '../EntityUtils';
|
||||
import {AlbumBaseDTO} from '../../../../../../common/entities/album/AlbumBaseDTO';
|
||||
|
||||
@Entity()
|
||||
@TableInheritance({column: {type: 'varchar', name: 'type', length: 16}})
|
||||
@TableInheritance({column: {type: 'varchar', name: 'type', length: 24}})
|
||||
export class AlbumBaseEntity implements AlbumBaseDTO {
|
||||
|
||||
@Index()
|
||||
|
@ -38,7 +38,7 @@ export class DBTestHelper {
|
||||
|
||||
static enable = {
|
||||
memory: false,
|
||||
sqlite: true,
|
||||
sqlite: process.env.TEST_SQLITE !== 'false',
|
||||
mysql: process.env.TEST_MYSQL !== 'false'
|
||||
};
|
||||
public static readonly savedDescribe = savedDescribe;
|
||||
@ -144,6 +144,7 @@ export class DBTestHelper {
|
||||
}
|
||||
|
||||
private async resetMySQL(): Promise<void> {
|
||||
await ObjectManagers.reset();
|
||||
Config.Server.Database.type = DatabaseType.mysql;
|
||||
Config.Server.Database.mysql.database = 'pigallery2_test';
|
||||
const conn = await SQLConnection.getConnection();
|
||||
|
Loading…
Reference in New Issue
Block a user