mirror of
https://github.com/immich-app/immich.git
synced 2025-01-25 05:02:46 +01:00
cc2dc12f6c
* run migrations after checks * optional migrations * only run checks in server and e2e * re-add migrations for microservices * refactor * move e2e init * remove assert from migration * update providers * update microservices app service * fixed logging * refactored version check, added unit tests * more version tests * don't use mocks for sut * refactor tests * suggest image only if postgres is 14, 15 or 16 * review suggestions * fixed regexp escape * fix typing * update migration
10 lines
381 B
TypeScript
10 lines
381 B
TypeScript
import { IDatabaseRepository, Version } from '@app/domain';
|
|
|
|
export const newDatabaseRepositoryMock = (): jest.Mocked<IDatabaseRepository> => {
|
|
return {
|
|
getExtensionVersion: jest.fn(),
|
|
getPostgresVersion: jest.fn().mockResolvedValue(new Version(14, 0, 0)),
|
|
createExtension: jest.fn().mockImplementation(() => Promise.resolve()),
|
|
runMigrations: jest.fn(),
|
|
};
|
|
};
|