Skip to content

Commit

Permalink
Fixing failing Album tests #45
Browse files Browse the repository at this point in the history
  • Loading branch information
bpatrik committed May 28, 2021
1 parent 682c2e5 commit a5630a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 2 additions & 1 deletion test/backend/DBTestHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit a5630a2

Please sign in to comment.