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 | |
parent | 6d989edc66e7b541fcf97c2a4a6f91cbf960060a (diff) | |
download | PeerTube-5e8dd6e08ac1595aeb72c6b5b2c7d2c6aced8b47.tar.gz PeerTube-5e8dd6e08ac1595aeb72c6b5b2c7d2c6aced8b47.tar.zst PeerTube-5e8dd6e08ac1595aeb72c6b5b2c7d2c6aced8b47.zip |
Fix lint
Diffstat (limited to 'server')
-rw-r--r-- | server/middlewares/validators/users.ts | 2 | ||||
-rw-r--r-- | server/tests/api/redundancy/redundancy.ts | 15 |
2 files changed, 12 insertions, 5 deletions
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts index 345571e83..9cff51d45 100644 --- a/server/middlewares/validators/users.ts +++ b/server/middlewares/validators/users.ts | |||
@@ -7,7 +7,7 @@ import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-code | |||
7 | import { UserRole } from '../../../shared/models/users' | 7 | import { UserRole } from '../../../shared/models/users' |
8 | import { UserRegister } from '../../../shared/models/users/user-register.model' | 8 | import { UserRegister } from '../../../shared/models/users/user-register.model' |
9 | import { isActorPreferredUsernameValid } from '../../helpers/custom-validators/activitypub/actor' | 9 | import { isActorPreferredUsernameValid } from '../../helpers/custom-validators/activitypub/actor' |
10 | import { exists, isIdOrUUIDValid, toBooleanOrNull, toIntOrNull } from '../../helpers/custom-validators/misc' | 10 | import { isIdOrUUIDValid, toBooleanOrNull, toIntOrNull } from '../../helpers/custom-validators/misc' |
11 | import { isThemeNameValid } from '../../helpers/custom-validators/plugins' | 11 | import { isThemeNameValid } from '../../helpers/custom-validators/plugins' |
12 | import { | 12 | import { |
13 | isNoInstanceConfigWarningModal, | 13 | isNoInstanceConfigWarningModal, |
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 | ||