From 73fb3dc53571a6e94750a9d6cb5c2e949e1adcb9 Mon Sep 17 00:00:00 2001 From: Wicklow Date: Tue, 7 Mar 2023 10:52:20 +0100 Subject: Fix file token reinjection on fragments --- server/tests/api/videos/video-static-file-privacy.ts | 5 ++--- server/tests/shared/streaming-playlists.ts | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'server/tests') diff --git a/server/tests/api/videos/video-static-file-privacy.ts b/server/tests/api/videos/video-static-file-privacy.ts index ef0774b41..16530884e 100644 --- a/server/tests/api/videos/video-static-file-privacy.ts +++ b/server/tests/api/videos/video-static-file-privacy.ts @@ -256,10 +256,9 @@ describe('Test video static file privacy', function () { const videoFileToken = await server.videoToken.getVideoFileToken({ videoId: uuid }) await waitJobs([ server ]) - const video = await server.videos.getWithToken({ id: uuid }) - const hls = video.streamingPlaylists[0] - { + const video = await server.videos.getWithToken({ id: uuid }) + const hls = video.streamingPlaylists[0] const query = { videoFileToken } const { text } = await makeRawRequest({ url: hls.playlistUrl, query, expectedStatus: HttpStatusCode.OK_200 }) diff --git a/server/tests/shared/streaming-playlists.ts b/server/tests/shared/streaming-playlists.ts index 75e135c4e..1c38cb512 100644 --- a/server/tests/shared/streaming-playlists.ts +++ b/server/tests/shared/streaming-playlists.ts @@ -214,7 +214,7 @@ async function checkVideoFileTokenReinjection (options: { ? i : `-${resolution}` - expect(text).to.contain(`${suffix}.m3u8?videoFileToken=${videoFileToken}`) + expect(text).to.contain(`${suffix}.m3u8?videoFileToken=${videoFileToken}&reinjectVideoFileToken=true`) } const resolutionPlaylists = extractResolutionPlaylistUrls(hls.playlistUrl, text) @@ -228,6 +228,7 @@ async function checkVideoFileTokenReinjection (options: { : '.mp4' expect(text).to.contain(`${extension}?videoFileToken=${videoFileToken}`) + expect(text).not.to.contain(`reinjectVideoFileToken=true`) } } -- cgit v1.2.3