|
|
|
|
@ -19,6 +19,7 @@ describe(StorageService.name, () => {
|
|
|
|
|
describe('onBootstrap', () => {
|
|
|
|
|
it('should enable mount folder checking', async () => {
|
|
|
|
|
mocks.systemMetadata.get.mockResolvedValue(null);
|
|
|
|
|
mocks.asset.getFileSamples.mockResolvedValue([]);
|
|
|
|
|
|
|
|
|
|
await expect(sut.onBootstrap()).resolves.toBeUndefined();
|
|
|
|
|
|
|
|
|
|
@ -75,6 +76,7 @@ describe(StorageService.name, () => {
|
|
|
|
|
upload: true,
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
mocks.asset.getFileSamples.mockResolvedValue([]);
|
|
|
|
|
|
|
|
|
|
await expect(sut.onBootstrap()).resolves.toBeUndefined();
|
|
|
|
|
|
|
|
|
|
@ -128,6 +130,7 @@ describe(StorageService.name, () => {
|
|
|
|
|
error.code = 'EEXIST';
|
|
|
|
|
mocks.systemMetadata.get.mockResolvedValue({ mountChecks: {} });
|
|
|
|
|
mocks.storage.createFile.mockRejectedValue(error);
|
|
|
|
|
mocks.asset.getFileSamples.mockResolvedValue([]);
|
|
|
|
|
|
|
|
|
|
await expect(sut.onBootstrap()).resolves.toBeUndefined();
|
|
|
|
|
|
|
|
|
|
@ -149,6 +152,7 @@ describe(StorageService.name, () => {
|
|
|
|
|
storage: { ignoreMountCheckErrors: true },
|
|
|
|
|
}),
|
|
|
|
|
);
|
|
|
|
|
mocks.asset.getFileSamples.mockResolvedValue([]);
|
|
|
|
|
mocks.storage.overwriteFile.mockRejectedValue(
|
|
|
|
|
new Error("ENOENT: no such file or directory, open '/app/.immich'"),
|
|
|
|
|
);
|
|
|
|
|
|