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,
ServerInfo,
setAccessTokensToServers,
unfollow,
+ updateVideo,
uploadVideo,
viewVideo,
wait,
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
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 () {
try {
await check1WebSeed(video1Server2UUID)
await check0PlaylistRedundancies(video1Server2UUID)
+
await check2Webseeds(video2Server2UUID)
await check1PlaylistRedundancies(video2Server2UUID)