1
0
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:
Patrik J. Braun 2021-05-28 23:28:12 +02:00
parent 682c2e5c11
commit a5630a2fe8
2 changed files with 3 additions and 2 deletions

View File

@ -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()

View File

@ -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();