aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
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 })