You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-08-10 23:22:22 +02:00
feat: use stream for template migrations (#16700)
This commit is contained in:
16
server/test/fixtures/asset.stub.ts
vendored
16
server/test/fixtures/asset.stub.ts
vendored
@@ -3,6 +3,7 @@ import { AssetEntity } from 'src/entities/asset.entity';
|
||||
import { ExifEntity } from 'src/entities/exif.entity';
|
||||
import { StackEntity } from 'src/entities/stack.entity';
|
||||
import { AssetFileType, AssetStatus, AssetType } from 'src/enum';
|
||||
import { StorageAsset } from 'src/types';
|
||||
import { authStub } from 'test/fixtures/auth.stub';
|
||||
import { fileStub } from 'test/fixtures/file.stub';
|
||||
import { libraryStub } from 'test/fixtures/library.stub';
|
||||
@@ -40,6 +41,21 @@ export const stackStub = (stackId: string, assets: AssetEntity[]): StackEntity =
|
||||
};
|
||||
|
||||
export const assetStub = {
|
||||
storageAsset: (asset: Partial<StorageAsset> = {}) => ({
|
||||
id: 'asset-id',
|
||||
ownerId: 'user-id',
|
||||
livePhotoVideoId: null,
|
||||
type: AssetType.IMAGE,
|
||||
isExternal: false,
|
||||
checksum: Buffer.from('file hash'),
|
||||
timeZone: null,
|
||||
fileCreatedAt: new Date('2022-06-19T23:41:36.910Z'),
|
||||
originalPath: '/original/path.jpg',
|
||||
originalFileName: 'IMG_123.jpg',
|
||||
sidecarPath: null,
|
||||
fileSizeInByte: 12_345,
|
||||
...asset,
|
||||
}),
|
||||
noResizePath: Object.freeze<AssetEntity>({
|
||||
id: 'asset-id',
|
||||
status: AssetStatus.ACTIVE,
|
||||
|
Reference in New Issue
Block a user