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.ts15
1 files changed, 11 insertions, 4 deletions
diff --git a/server/tests/api/redundancy/redundancy.ts b/server/tests/api/redundancy/redundancy.ts
index 811dc8c55..0e0a73b9d 100644
--- a/server/tests/api/redundancy/redundancy.ts
+++ b/server/tests/api/redundancy/redundancy.ts
@@ -24,6 +24,7 @@ import {
24 ServerInfo, 24 ServerInfo,
25 setAccessTokensToServers, 25 setAccessTokensToServers,
26 unfollow, 26 unfollow,
27 updateVideo,
27 uploadVideo, 28 uploadVideo,
28 viewVideo, 29 viewVideo,
29 wait, 30 wait,
@@ -40,7 +41,7 @@ import { getStats } from '../../../../shared/extra-utils/server/stats'
40import { ActorFollow } from '../../../../shared/models/actors' 41import { ActorFollow } from '../../../../shared/models/actors'
41import { VideoRedundancy, VideoRedundancyStrategy, VideoRedundancyStrategyWithManual } from '../../../../shared/models/redundancy' 42import { VideoRedundancy, VideoRedundancyStrategy, VideoRedundancyStrategyWithManual } from '../../../../shared/models/redundancy'
42import { ServerStats } from '../../../../shared/models/server/server-stats.model' 43import { ServerStats } from '../../../../shared/models/server/server-stats.model'
43import { VideoDetails } from '../../../../shared/models/videos' 44import { VideoDetails, VideoPrivacy } from '../../../../shared/models/videos'
44 45
45const expect = chai.expect 46const expect = chai.expect
46 47
@@ -682,12 +683,17 @@ describe('Test videos redundancy', function () {
682 await waitUntilLog(servers[0], 'Duplicated ', 5) 683 await waitUntilLog(servers[0], 'Duplicated ', 5)
683 await waitJobs(servers) 684 await waitJobs(servers)
684 685
685 await check2Webseeds() 686 await check2Webseeds(video1Server2UUID)
686 await check1PlaylistRedundancies() 687 await check1PlaylistRedundancies(video1Server2UUID)
687 await checkStatsWith1Redundancy(strategy) 688 await checkStatsWith1Redundancy(strategy)
688 689
689 const res = await uploadVideo(servers[1].url, servers[1].accessToken, { name: 'video 2 server 2' }) 690 const res = await uploadVideo(servers[1].url, servers[1].accessToken, { name: 'video 2 server 2', privacy: VideoPrivacy.PRIVATE })
690 video2Server2UUID = res.body.video.uuid 691 video2Server2UUID = res.body.video.uuid
692
693 // Wait transcoding before federation
694 await waitJobs(servers)
695
696 await updateVideo(servers[1].url, servers[1].accessToken, video2Server2UUID, { privacy: VideoPrivacy.PUBLIC })
691 }) 697 })
692 698
693 it('Should cache video 2 webseeds on the first video', async function () { 699 it('Should cache video 2 webseeds on the first video', async function () {
@@ -703,6 +709,7 @@ describe('Test videos redundancy', function () {
703 try { 709 try {
704 await check1WebSeed(video1Server2UUID) 710 await check1WebSeed(video1Server2UUID)
705 await check0PlaylistRedundancies(video1Server2UUID) 711 await check0PlaylistRedundancies(video1Server2UUID)
712
706 await check2Webseeds(video2Server2UUID) 713 await check2Webseeds(video2Server2UUID)
707 await check1PlaylistRedundancies(video2Server2UUID) 714 await check1PlaylistRedundancies(video2Server2UUID)
708 715