diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-01 16:05:22 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-02-01 16:05:22 +0100 |
commit | 5e8dd6e08ac1595aeb72c6b5b2c7d2c6aced8b47 (patch) | |
tree | 998863df0904da9dd5232d9f2622d1ef786c5122 /server/tests | |
parent | 6d989edc66e7b541fcf97c2a4a6f91cbf960060a (diff) | |
download | PeerTube-5e8dd6e08ac1595aeb72c6b5b2c7d2c6aced8b47.tar.gz PeerTube-5e8dd6e08ac1595aeb72c6b5b2c7d2c6aced8b47.tar.zst PeerTube-5e8dd6e08ac1595aeb72c6b5b2c7d2c6aced8b47.zip |
Fix lint
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/api/redundancy/redundancy.ts | 15 |
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' | |||
40 | import { ActorFollow } from '../../../../shared/models/actors' | 41 | import { ActorFollow } from '../../../../shared/models/actors' |
41 | import { VideoRedundancy, VideoRedundancyStrategy, VideoRedundancyStrategyWithManual } from '../../../../shared/models/redundancy' | 42 | import { VideoRedundancy, VideoRedundancyStrategy, VideoRedundancyStrategyWithManual } from '../../../../shared/models/redundancy' |
42 | import { ServerStats } from '../../../../shared/models/server/server-stats.model' | 43 | import { ServerStats } from '../../../../shared/models/server/server-stats.model' |
43 | import { VideoDetails } from '../../../../shared/models/videos' | 44 | import { VideoDetails, VideoPrivacy } from '../../../../shared/models/videos' |
44 | 45 | ||
45 | const expect = chai.expect | 46 | const 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 | ||