From 5e8dd6e08ac1595aeb72c6b5b2c7d2c6aced8b47 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 1 Feb 2021 16:05:22 +0100 Subject: Fix lint --- server/middlewares/validators/users.ts | 2 +- 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 import { UserRole } from '../../../shared/models/users' import { UserRegister } from '../../../shared/models/users/user-register.model' import { isActorPreferredUsernameValid } from '../../helpers/custom-validators/activitypub/actor' -import { exists, isIdOrUUIDValid, toBooleanOrNull, toIntOrNull } from '../../helpers/custom-validators/misc' +import { isIdOrUUIDValid, toBooleanOrNull, toIntOrNull } from '../../helpers/custom-validators/misc' import { isThemeNameValid } from '../../helpers/custom-validators/plugins' import { 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 { ServerInfo, setAccessTokensToServers, unfollow, + updateVideo, uploadVideo, viewVideo, wait, @@ -40,7 +41,7 @@ import { getStats } from '../../../../shared/extra-utils/server/stats' import { ActorFollow } from '../../../../shared/models/actors' import { VideoRedundancy, VideoRedundancyStrategy, VideoRedundancyStrategyWithManual } from '../../../../shared/models/redundancy' import { ServerStats } from '../../../../shared/models/server/server-stats.model' -import { VideoDetails } from '../../../../shared/models/videos' +import { VideoDetails, VideoPrivacy } from '../../../../shared/models/videos' const expect = chai.expect @@ -682,12 +683,17 @@ describe('Test videos redundancy', function () { await waitUntilLog(servers[0], 'Duplicated ', 5) await waitJobs(servers) - await check2Webseeds() - await check1PlaylistRedundancies() + await check2Webseeds(video1Server2UUID) + await check1PlaylistRedundancies(video1Server2UUID) await checkStatsWith1Redundancy(strategy) - const res = await uploadVideo(servers[1].url, servers[1].accessToken, { name: 'video 2 server 2' }) + const res = await uploadVideo(servers[1].url, servers[1].accessToken, { name: 'video 2 server 2', privacy: VideoPrivacy.PRIVATE }) video2Server2UUID = res.body.video.uuid + + // Wait transcoding before federation + await waitJobs(servers) + + await updateVideo(servers[1].url, servers[1].accessToken, video2Server2UUID, { privacy: VideoPrivacy.PUBLIC }) }) it('Should cache video 2 webseeds on the first video', async function () { @@ -703,6 +709,7 @@ describe('Test videos redundancy', function () { try { await check1WebSeed(video1Server2UUID) await check0PlaylistRedundancies(video1Server2UUID) + await check2Webseeds(video2Server2UUID) await check1PlaylistRedundancies(video2Server2UUID) -- cgit v1.2.3