test(storage): follow the release queue in the tests that pinned an immediate delete

Replacing a cover or an avatar and deleting a note file now hand the old
bytes to the release queue instead of deleting them in the request; the
integration tests check the queue row and that the bytes are still
there. Release mocks answer with a count, the reclaim e2e sends its
refused bodies one after another, and a stale-count reload that fails is
told to the admin instead of swallowed.
This commit is contained in:
Maurice
2026-11-01 18:46:58 +01:00
parent 0b598680ec
commit bf8e04741d
9 changed files with 56 additions and 26 deletions
@@ -432,7 +432,14 @@ export function useStorageAdmin(genericError: string, conflictError: string): St
} catch (err: unknown) {
const failure = reclaimFailureOf(err, genericError)
// The count moved on since it was shown: show the current one before the admin confirms again.
if ('code' in failure && failure.code === 'reclaim_confirm_stale') void refreshState().catch(() => {})
if ('code' in failure && failure.code === 'reclaim_confirm_stale') {
try {
await refreshState()
} catch (reloadErr: unknown) {
// Without the new figure there is nothing to confirm against: say why instead.
return reclaimFailureOf(reloadErr, genericError)
}
}
return failure
}
},