aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-10-03 16:43:57 +0200
committerChocobozzz <me@florianbigard.com>2018-10-03 16:43:57 +0200
commit25378bc866a69002d7447e5edc254ec7e469a1ec (patch)
treefd12d97cb571de83b1281554baba9c28606eaab9 /server/tests/api
parentbe691a57c590348fd36d6e11dc1fe4cc8eaa0719 (diff)
downloadPeerTube-25378bc866a69002d7447e5edc254ec7e469a1ec.tar.gz
PeerTube-25378bc866a69002d7447e5edc254ec7e469a1ec.tar.zst
PeerTube-25378bc866a69002d7447e5edc254ec7e469a1ec.zip
Delete correctly redundancy files
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/server/redundancy.ts19
1 files changed, 18 insertions, 1 deletions
diff --git a/server/tests/api/server/redundancy.ts b/server/tests/api/server/redundancy.ts
index d60319657..1960854b6 100644
--- a/server/tests/api/server/redundancy.ts
+++ b/server/tests/api/server/redundancy.ts
@@ -16,7 +16,8 @@ import {
16 uploadVideo, 16 uploadVideo,
17 viewVideo, 17 viewVideo,
18 wait, 18 wait,
19 waitUntilLog 19 waitUntilLog,
20 checkVideoFilesWereRemoved, removeVideo
20} from '../../utils' 21} from '../../utils'
21import { waitJobs } from '../../utils/server/jobs' 22import { waitJobs } from '../../utils/server/jobs'
22import * as magnetUtil from 'magnet-uri' 23import * as magnetUtil from 'magnet-uri'
@@ -242,6 +243,8 @@ describe('Test videos redundancy', function () {
242 await wait(5000) 243 await wait(5000)
243 244
244 await check1WebSeed(strategy) 245 await check1WebSeed(strategy)
246
247 await checkVideoFilesWereRemoved(video1Server2UUID, servers[0].serverNumber, [ 'videos' ])
245 }) 248 })
246 249
247 after(function () { 250 after(function () {
@@ -287,6 +290,8 @@ describe('Test videos redundancy', function () {
287 await wait(5000) 290 await wait(5000)
288 291
289 await check1WebSeed(strategy) 292 await check1WebSeed(strategy)
293
294 await checkVideoFilesWereRemoved(video1Server2UUID, servers[0].serverNumber, [ 'videos' ])
290 }) 295 })
291 296
292 after(function () { 297 after(function () {
@@ -344,6 +349,18 @@ describe('Test videos redundancy', function () {
344 await checkStatsWith2Webseed(strategy) 349 await checkStatsWith2Webseed(strategy)
345 }) 350 })
346 351
352 it('Should remove the video and the redundancy files', async function () {
353 this.timeout(20000)
354
355 await removeVideo(servers[1].url, servers[1].accessToken, video1Server2UUID)
356
357 await waitJobs(servers)
358
359 for (const server of servers) {
360 await checkVideoFilesWereRemoved(video1Server2UUID, server.serverNumber)
361 }
362 })
363
347 after(function () { 364 after(function () {
348 return cleanServers() 365 return cleanServers()
349 }) 366 })