fix(server): flaky library e2e tests ()

This commit is contained in:
Jonathan Jogenfors 2025-02-18 00:26:44 +01:00 committed by GitHub
parent 9eab770e79
commit bfdd6eac01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 56 additions and 166 deletions
e2e/src

View file

@ -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();