refactor: e2e tests (#4536)

This commit is contained in:
Jason Rasmussen 2023-10-18 18:02:42 -04:00 committed by GitHub
parent 31987bc043
commit 4b59f83288
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 189 additions and 201 deletions

View file

@ -109,6 +109,10 @@ export class MetadataService {
}
}
async teardown() {
await this.repository.teardown();
}
async handleLivePhotoLinking(job: IEntityJob) {
const { id } = job;
const [asset] = await this.assetRepository.getByIds([id]);

View file

@ -26,6 +26,7 @@ export interface ImmichTags extends Omit<Tags, 'FocalLength'> {
export interface IMetadataRepository {
init(options: Partial<InitOptions>): Promise<void>;
teardown(): Promise<void>;
reverseGeocode(point: GeoPoint): Promise<ReverseGeocodeResult>;
deleteCache(): Promise<void>;
getExifTags(path: string): Promise<ImmichTags | null>;

View file

@ -45,6 +45,10 @@ export class MetadataRepository implements IMetadataRepository {
});
}
async teardown() {
await exiftool.end();
}
async deleteCache() {
const dumpDirectory = REVERSE_GEOCODING_DUMP_DIRECTORY;
if (dumpDirectory) {

View file

@ -103,4 +103,8 @@ export class AppService {
await this.metadataService.init();
await this.searchService.init();
}
async teardown() {
await this.metadataService.teardown();
}
}