aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/object-storage/video-static-file-privacy.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/object-storage/video-static-file-privacy.ts')
-rw-r--r--server/tests/api/object-storage/video-static-file-privacy.ts36
1 files changed, 35 insertions, 1 deletions
diff --git a/server/tests/api/object-storage/video-static-file-privacy.ts b/server/tests/api/object-storage/video-static-file-privacy.ts
index 62edd10ba..71ad35a43 100644
--- a/server/tests/api/object-storage/video-static-file-privacy.ts
+++ b/server/tests/api/object-storage/video-static-file-privacy.ts
@@ -2,7 +2,7 @@
2 2
3import { expect } from 'chai' 3import { expect } from 'chai'
4import { basename } from 'path' 4import { basename } from 'path'
5import { expectStartWith } from '@server/tests/shared' 5import { checkVideoFileTokenReinjection, expectStartWith } from '@server/tests/shared'
6import { areScalewayObjectStorageTestsDisabled, getAllFiles, getHLS } from '@shared/core-utils' 6import { areScalewayObjectStorageTestsDisabled, getAllFiles, getHLS } from '@shared/core-utils'
7import { HttpStatusCode, LiveVideo, VideoDetails, VideoPrivacy } from '@shared/models' 7import { HttpStatusCode, LiveVideo, VideoDetails, VideoPrivacy } from '@shared/models'
8import { 8import {
@@ -191,6 +191,20 @@ describe('Object storage for video static file privacy', function () {
191 } 191 }
192 }) 192 })
193 193
194 it('Should reinject video file token', async function () {
195 this.timeout(120000)
196
197 const videoFileToken = await server.videoToken.getVideoFileToken({ videoId: privateVideoUUID })
198
199 await checkVideoFileTokenReinjection({
200 server,
201 videoUUID: privateVideoUUID,
202 videoFileToken,
203 resolutions: [ 240, 720 ],
204 isLive: false
205 })
206 })
207
194 it('Should update public video to private', async function () { 208 it('Should update public video to private', async function () {
195 this.timeout(60000) 209 this.timeout(60000)
196 210
@@ -315,6 +329,26 @@ describe('Object storage for video static file privacy', function () {
315 await checkLiveFiles(permanentLive, permanentLiveId) 329 await checkLiveFiles(permanentLive, permanentLiveId)
316 }) 330 })
317 331
332 it('Should reinject video file token in permanent live', async function () {
333 this.timeout(240000)
334
335 const ffmpegCommand = sendRTMPStream({ rtmpBaseUrl: permanentLive.rtmpUrl, streamKey: permanentLive.streamKey })
336 await server.live.waitUntilPublished({ videoId: permanentLiveId })
337
338 const video = await server.videos.getWithToken({ id: permanentLiveId })
339 const videoFileToken = await server.videoToken.getVideoFileToken({ videoId: video.uuid })
340
341 await checkVideoFileTokenReinjection({
342 server,
343 videoUUID: permanentLiveId,
344 videoFileToken,
345 resolutions: [ 720 ],
346 isLive: true
347 })
348
349 await stopFfmpeg(ffmpegCommand)
350 })
351
318 it('Should have created a replay of the normal live with a private static path', async function () { 352 it('Should have created a replay of the normal live with a private static path', async function () {
319 this.timeout(240000) 353 this.timeout(240000)
320 354