mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
strip down core
This commit is contained in:
@@ -5,25 +5,17 @@ import { Mocked, vitest } from 'vitest';
|
||||
export const newDatabaseRepositoryMock = (): Mocked<RepositoryInterface<DatabaseRepository>> => {
|
||||
return {
|
||||
shutdown: vitest.fn(),
|
||||
getExtensionVersions: vitest.fn(),
|
||||
getVectorExtension: vitest.fn(),
|
||||
getExtensionVersion: vitest.fn(),
|
||||
getExtensionVersionRange: vitest.fn(),
|
||||
getPostgresVersion: vitest.fn().mockResolvedValue('14.10 (Debian 14.10-1.pgdg120+1)'),
|
||||
getPostgresVersionRange: vitest.fn().mockReturnValue('>=14.0.0'),
|
||||
createExtension: vitest.fn().mockResolvedValue(void 0),
|
||||
dropExtension: vitest.fn(),
|
||||
updateVectorExtension: vitest.fn(),
|
||||
reindexVectorsIfNeeded: vitest.fn(),
|
||||
getDimensionSize: vitest.fn(),
|
||||
setDimensionSize: vitest.fn(),
|
||||
deleteAllSearchEmbeddings: vitest.fn(),
|
||||
prewarm: vitest.fn(),
|
||||
runMigrations: vitest.fn(),
|
||||
revertLastMigration: vitest.fn(),
|
||||
withLock: vitest.fn().mockImplementation((_, function_: <R>() => Promise<R>) => function_()),
|
||||
tryLock: vitest.fn(),
|
||||
isBusy: vitest.fn(),
|
||||
wait: vitest.fn(),
|
||||
migrateFilePaths: vitest.fn(),
|
||||
};
|
||||
};
|
||||
|
||||
@@ -11,14 +11,10 @@ export const newJobRepositoryMock = (): Mocked<RepositoryInterface<JobRepository
|
||||
empty: vitest.fn(),
|
||||
pause: vitest.fn(),
|
||||
resume: vitest.fn(),
|
||||
searchJobs: vitest.fn(),
|
||||
queue: vitest.fn().mockImplementation(() => Promise.resolve()),
|
||||
queueAll: vitest.fn().mockImplementation(() => Promise.resolve()),
|
||||
isActive: vitest.fn(),
|
||||
isPaused: vitest.fn(),
|
||||
getJobCounts: vitest.fn(),
|
||||
clear: vitest.fn(),
|
||||
waitForQueueCompletion: vitest.fn(),
|
||||
removeJob: vitest.fn(),
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user