mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
chore: fmt
This commit is contained in:
@@ -4,7 +4,7 @@ import {
|
||||
LoginResponseDto,
|
||||
ManualJobName,
|
||||
QueueCommand,
|
||||
QueueName
|
||||
QueueName,
|
||||
} from '@immich/sdk';
|
||||
import { readFile } from 'node:fs/promises';
|
||||
import { app, testAssetDir, utils } from 'src/utils';
|
||||
@@ -32,13 +32,13 @@ describe('/admin/integrity', () => {
|
||||
user1 = await utils.userSetup(admin.accessToken, {
|
||||
email: '1@example.com',
|
||||
name: '1',
|
||||
password: '1'
|
||||
password: '1',
|
||||
});
|
||||
|
||||
user2 = await utils.userSetup(admin.accessToken, {
|
||||
email: '2@example.com',
|
||||
name: '2',
|
||||
password: '2'
|
||||
password: '2',
|
||||
});
|
||||
|
||||
for (const queue of Object.values(QueueName)) {
|
||||
@@ -47,7 +47,7 @@ describe('/admin/integrity', () => {
|
||||
}
|
||||
|
||||
await utils.queueCommand(admin.accessToken, queue, {
|
||||
command: QueueCommand.Pause
|
||||
command: QueueCommand.Pause,
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -83,11 +83,11 @@ describe('/admin/integrity', () => {
|
||||
}
|
||||
|
||||
await utils.queueCommand(admin.accessToken, queue, {
|
||||
command: QueueCommand.Empty
|
||||
command: QueueCommand.Empty,
|
||||
});
|
||||
|
||||
await utils.queueCommand(admin.accessToken, queue, {
|
||||
command: QueueCommand.Resume
|
||||
command: QueueCommand.Resume,
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -176,9 +176,7 @@ describe('/admin/integrity', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it.sequential(
|
||||
'should delete orphan files (job: delete all orphan file reports)',
|
||||
async () => {
|
||||
it.sequential('should delete orphan files (job: delete all orphan file reports)', async () => {
|
||||
await utils.putTextFile('orphan', `/data/upload/${admin.userId}/orphan1.png`);
|
||||
|
||||
await utils.createJob(admin.accessToken, {
|
||||
@@ -204,8 +202,7 @@ describe('/admin/integrity', () => {
|
||||
orphan_file: 0,
|
||||
}),
|
||||
);
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
it.sequential('should detect a missing file and not a checksum mismatch (job: check missing files)', async () => {
|
||||
await utils.deleteFolder(`/data/upload/${admin.userId}`);
|
||||
@@ -251,9 +248,7 @@ describe('/admin/integrity', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it.sequential(
|
||||
'should delete assets with missing files (job: delete all missing file reports)',
|
||||
async () => {
|
||||
it.sequential('should delete assets with missing files (job: delete all missing file reports)', async () => {
|
||||
await utils.deleteFolder(`/data/upload/${user1.userId}`);
|
||||
|
||||
await utils.createJob(admin.accessToken, {
|
||||
@@ -292,11 +287,12 @@ describe('/admin/integrity', () => {
|
||||
}),
|
||||
);
|
||||
|
||||
await expect(utils.getAssetInfo(user1.accessToken, asset1.id)).resolves.toEqual(expect.objectContaining({
|
||||
isTrashed: true
|
||||
}));
|
||||
},
|
||||
await expect(utils.getAssetInfo(user1.accessToken, asset1.id)).resolves.toEqual(
|
||||
expect.objectContaining({
|
||||
isTrashed: true,
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
it.sequential('should detect a checksum mismatch (job: check file checksums)', async () => {
|
||||
await utils.truncateFolder(`/data/upload/${admin.userId}`);
|
||||
@@ -381,9 +377,11 @@ describe('/admin/integrity', () => {
|
||||
}),
|
||||
);
|
||||
|
||||
await expect(utils.getAssetInfo(user2.accessToken, asset2.id)).resolves.toEqual(expect.objectContaining({
|
||||
isTrashed: true
|
||||
}));
|
||||
await expect(utils.getAssetInfo(user2.accessToken, asset2.id)).resolves.toEqual(
|
||||
expect.objectContaining({
|
||||
isTrashed: true,
|
||||
}),
|
||||
);
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user