aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/object-storage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-10-25 11:51:20 +0200
committerChocobozzz <me@florianbigard.com>2022-10-25 11:51:20 +0200
commit508c1b1e9f3b26752a961e945b7fa59b72b30827 (patch)
treea027845a959291dad787041396c2f9e30dc1af98 /server/tests/api/object-storage
parent849f0fd3b2d00056a2c6252230814d6c2e3e3919 (diff)
downloadPeerTube-508c1b1e9f3b26752a961e945b7fa59b72b30827.tar.gz
PeerTube-508c1b1e9f3b26752a961e945b7fa59b72b30827.tar.zst
PeerTube-508c1b1e9f3b26752a961e945b7fa59b72b30827.zip
Correctly cleanup files from object storage
Diffstat (limited to 'server/tests/api/object-storage')
-rw-r--r--server/tests/api/object-storage/video-static-file-privacy.ts22
1 files changed, 12 insertions, 10 deletions
diff --git a/server/tests/api/object-storage/video-static-file-privacy.ts b/server/tests/api/object-storage/video-static-file-privacy.ts
index 981bbaa16..c6d7a1a2c 100644
--- a/server/tests/api/object-storage/video-static-file-privacy.ts
+++ b/server/tests/api/object-storage/video-static-file-privacy.ts
@@ -192,16 +192,6 @@ describe('Object storage for video static file privacy', function () {
192 192
193 await checkPublicFiles(publicVideoUUID) 193 await checkPublicFiles(publicVideoUUID)
194 }) 194 })
195
196 after(async function () {
197 this.timeout(30000)
198
199 if (privateVideoUUID) await server.videos.remove({ id: privateVideoUUID })
200 if (publicVideoUUID) await server.videos.remove({ id: publicVideoUUID })
201 if (userPrivateVideoUUID) await server.videos.remove({ id: userPrivateVideoUUID })
202
203 await waitJobs([ server ])
204 })
205 }) 195 })
206 196
207 describe('Live', function () { 197 describe('Live', function () {
@@ -331,6 +321,18 @@ describe('Object storage for video static file privacy', function () {
331 }) 321 })
332 322
333 after(async function () { 323 after(async function () {
324 this.timeout(60000)
325
326 const { data } = await server.videos.listAllForAdmin()
327
328 for (const v of data) {
329 await server.videos.remove({ id: v.uuid })
330 }
331
332 for (const v of data) {
333 await server.servers.waitUntilLog('Removed files of video ' + v.url, 1, true)
334 }
335
334 await cleanupTests([ server ]) 336 await cleanupTests([ server ])
335 }) 337 })
336}) 338})