aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/redundancy/redundancy.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/redundancy/redundancy.ts')
-rw-r--r--server/tests/api/redundancy/redundancy.ts36
1 files changed, 18 insertions, 18 deletions
diff --git a/server/tests/api/redundancy/redundancy.ts b/server/tests/api/redundancy/redundancy.ts
index 56a2af395..00a5e86cc 100644
--- a/server/tests/api/redundancy/redundancy.ts
+++ b/server/tests/api/redundancy/redundancy.ts
@@ -14,7 +14,6 @@ import {
14 flushAndRunMultipleServers, 14 flushAndRunMultipleServers,
15 getVideo, 15 getVideo,
16 getVideoWithToken, 16 getVideoWithToken,
17 immutableAssign,
18 killallServers, 17 killallServers,
19 makeGetRequest, 18 makeGetRequest,
20 removeVideo, 19 removeVideo,
@@ -26,8 +25,7 @@ import {
26 uploadVideo, 25 uploadVideo,
27 viewVideo, 26 viewVideo,
28 wait, 27 wait,
29 waitJobs, 28 waitJobs
30 waitUntilLog
31} from '@shared/extra-utils' 29} from '@shared/extra-utils'
32import { VideoDetails, VideoPrivacy, VideoRedundancyStrategy, VideoRedundancyStrategyWithManual } from '@shared/models' 30import { VideoDetails, VideoPrivacy, VideoRedundancyStrategy, VideoRedundancyStrategyWithManual } from '@shared/models'
33 31
@@ -53,11 +51,13 @@ async function flushAndRunServers (strategy: VideoRedundancyStrategy | null, add
53 51
54 if (strategy !== null) { 52 if (strategy !== null) {
55 strategies.push( 53 strategies.push(
56 immutableAssign({ 54 {
57 min_lifetime: '1 hour', 55 min_lifetime: '1 hour',
58 strategy: strategy, 56 strategy: strategy,
59 size: '400KB' 57 size: '400KB',
60 }, additionalParams) 58
59 ...additionalParams
60 }
61 ) 61 )
62 } 62 }
63 63
@@ -316,7 +316,7 @@ describe('Test videos redundancy', function () {
316 this.timeout(80000) 316 this.timeout(80000)
317 317
318 await waitJobs(servers) 318 await waitJobs(servers)
319 await waitUntilLog(servers[0], 'Duplicated ', 5) 319 await servers[0].serversCommand.waitUntilLog('Duplicated ', 5)
320 await waitJobs(servers) 320 await waitJobs(servers)
321 321
322 await check2Webseeds() 322 await check2Webseeds()
@@ -335,7 +335,7 @@ describe('Test videos redundancy', function () {
335 await check1WebSeed() 335 await check1WebSeed()
336 await check0PlaylistRedundancies() 336 await check0PlaylistRedundancies()
337 337
338 await checkVideoFilesWereRemoved(video1Server2UUID, servers[0].internalServerNumber, [ 'videos', join('playlists', 'hls') ]) 338 await checkVideoFilesWereRemoved(video1Server2UUID, servers[0], [ 'videos', join('playlists', 'hls') ])
339 }) 339 })
340 340
341 after(async function () { 341 after(async function () {
@@ -366,7 +366,7 @@ describe('Test videos redundancy', function () {
366 this.timeout(80000) 366 this.timeout(80000)
367 367
368 await waitJobs(servers) 368 await waitJobs(servers)
369 await waitUntilLog(servers[0], 'Duplicated ', 5) 369 await servers[0].serversCommand.waitUntilLog('Duplicated ', 5)
370 await waitJobs(servers) 370 await waitJobs(servers)
371 371
372 await check2Webseeds() 372 await check2Webseeds()
@@ -385,7 +385,7 @@ describe('Test videos redundancy', function () {
385 await check1WebSeed() 385 await check1WebSeed()
386 await check0PlaylistRedundancies() 386 await check0PlaylistRedundancies()
387 387
388 await checkVideoFilesWereRemoved(video1Server2UUID, servers[0].internalServerNumber, [ 'videos' ]) 388 await checkVideoFilesWereRemoved(video1Server2UUID, servers[0], [ 'videos' ])
389 }) 389 })
390 390
391 after(async function () { 391 after(async function () {
@@ -438,7 +438,7 @@ describe('Test videos redundancy', function () {
438 this.timeout(80000) 438 this.timeout(80000)
439 439
440 await waitJobs(servers) 440 await waitJobs(servers)
441 await waitUntilLog(servers[0], 'Duplicated ', 5) 441 await servers[0].serversCommand.waitUntilLog('Duplicated ', 5)
442 await waitJobs(servers) 442 await waitJobs(servers)
443 443
444 await check2Webseeds() 444 await check2Webseeds()
@@ -454,7 +454,7 @@ describe('Test videos redundancy', function () {
454 await waitJobs(servers) 454 await waitJobs(servers)
455 455
456 for (const server of servers) { 456 for (const server of servers) {
457 await checkVideoFilesWereRemoved(video1Server2UUID, server.internalServerNumber) 457 await checkVideoFilesWereRemoved(video1Server2UUID, server)
458 } 458 }
459 }) 459 })
460 460
@@ -502,7 +502,7 @@ describe('Test videos redundancy', function () {
502 await waitJobs(servers) 502 await waitJobs(servers)
503 503
504 await waitJobs(servers) 504 await waitJobs(servers)
505 await waitUntilLog(servers[0], 'Duplicated ', 1) 505 await servers[0].serversCommand.waitUntilLog('Duplicated ', 1)
506 await waitJobs(servers) 506 await waitJobs(servers)
507 507
508 await check1PlaylistRedundancies() 508 await check1PlaylistRedundancies()
@@ -517,7 +517,7 @@ describe('Test videos redundancy', function () {
517 await waitJobs(servers) 517 await waitJobs(servers)
518 518
519 for (const server of servers) { 519 for (const server of servers) {
520 await checkVideoFilesWereRemoved(video1Server2UUID, server.internalServerNumber) 520 await checkVideoFilesWereRemoved(video1Server2UUID, server)
521 } 521 }
522 }) 522 })
523 523
@@ -547,7 +547,7 @@ describe('Test videos redundancy', function () {
547 this.timeout(80000) 547 this.timeout(80000)
548 548
549 await waitJobs(servers) 549 await waitJobs(servers)
550 await waitUntilLog(servers[0], 'Duplicated ', 5) 550 await servers[0].serversCommand.waitUntilLog('Duplicated ', 5)
551 await waitJobs(servers) 551 await waitJobs(servers)
552 552
553 await check2Webseeds() 553 await check2Webseeds()
@@ -575,7 +575,7 @@ describe('Test videos redundancy', function () {
575 await check1WebSeed() 575 await check1WebSeed()
576 await check0PlaylistRedundancies() 576 await check0PlaylistRedundancies()
577 577
578 await checkVideoFilesWereRemoved(video1Server2UUID, servers[0].serverNumber, [ 'videos' ]) 578 await checkVideoFilesWereRemoved(video1Server2UUID, servers[0], [ 'videos' ])
579 }) 579 })
580 580
581 after(async function () { 581 after(async function () {
@@ -658,7 +658,7 @@ describe('Test videos redundancy', function () {
658 await enableRedundancyOnServer1() 658 await enableRedundancyOnServer1()
659 659
660 await waitJobs(servers) 660 await waitJobs(servers)
661 await waitUntilLog(servers[0], 'Duplicated ', 5) 661 await servers[0].serversCommand.waitUntilLog('Duplicated ', 5)
662 await waitJobs(servers) 662 await waitJobs(servers)
663 663
664 await check2Webseeds(video1Server2UUID) 664 await check2Webseeds(video1Server2UUID)
@@ -715,7 +715,7 @@ describe('Test videos redundancy', function () {
715 715
716 await waitJobs(servers) 716 await waitJobs(servers)
717 717
718 await checkVideoFilesWereRemoved(video1Server2UUID, servers[0].internalServerNumber, [ join('redundancy', 'hls') ]) 718 await checkVideoFilesWereRemoved(video1Server2UUID, servers[0], [ join('redundancy', 'hls') ])
719 }) 719 })
720 720
721 after(async function () { 721 after(async function () {