1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Correctly cleanup files from object storage

This commit is contained in:
Chocobozzz 2022-10-25 11:51:20 +02:00
parent 849f0fd3b2
commit 508c1b1e9f
No known key found for this signature in database
GPG key ID: 583A612D890159BE
4 changed files with 42 additions and 19 deletions

View file

@ -192,16 +192,6 @@ describe('Object storage for video static file privacy', function () {
await checkPublicFiles(publicVideoUUID)
})
after(async function () {
this.timeout(30000)
if (privateVideoUUID) await server.videos.remove({ id: privateVideoUUID })
if (publicVideoUUID) await server.videos.remove({ id: publicVideoUUID })
if (userPrivateVideoUUID) await server.videos.remove({ id: userPrivateVideoUUID })
await waitJobs([ server ])
})
})
describe('Live', function () {
@ -331,6 +321,18 @@ describe('Object storage for video static file privacy', function () {
})
after(async function () {
this.timeout(60000)
const { data } = await server.videos.listAllForAdmin()
for (const v of data) {
await server.videos.remove({ id: v.uuid })
}
for (const v of data) {
await server.servers.waitUntilLog('Removed files of video ' + v.url, 1, true)
}
await cleanupTests([ server ])
})
})