mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 09:12:57 +02:00
fix(server): flaky library e2e tests (#16174)
This commit is contained in:
parent
9eab770e79
commit
bfdd6eac01
2 changed files with 56 additions and 166 deletions
e2e/src
|
@ -30,6 +30,7 @@ import {
|
|||
getAssetInfo,
|
||||
getConfigDefaults,
|
||||
login,
|
||||
scanLibrary,
|
||||
searchAssets,
|
||||
sendJobCommand,
|
||||
setBaseUrl,
|
||||
|
@ -553,6 +554,16 @@ export const utils = {
|
|||
await immichCli(['login', app, `${key.secret}`]);
|
||||
return key.secret;
|
||||
},
|
||||
|
||||
scan: async (accessToken: string, id: string, wait = false) => {
|
||||
await scanLibrary({ id }, { headers: asBearerAuth(accessToken) });
|
||||
|
||||
if (wait) {
|
||||
await utils.waitForQueueFinish(accessToken, 'library');
|
||||
await utils.waitForQueueFinish(accessToken, 'sidecar');
|
||||
await utils.waitForQueueFinish(accessToken, 'metadataExtraction');
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
utils.initSdk();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue