]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/video-static-file-privacy.ts
Fix s3 mock cleanup
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / video-static-file-privacy.ts
index ef0774b418576dbaa569a07efc84be202cbe1701..54284853342aff6ec41e93c5e0c0b85c02637d4b 100644 (file)
@@ -2,7 +2,7 @@
 
 import { expect } from 'chai'
 import { decode } from 'magnet-uri'
-import { checkVideoFileTokenReinjection, expectStartWith } from '@server/tests/shared'
+import { checkVideoFileTokenReinjection, expectStartWith, parseTorrentVideo } from '@server/tests/shared'
 import { getAllFiles, wait } from '@shared/core-utils'
 import { HttpStatusCode, LiveVideo, VideoDetails, VideoPrivacy } from '@shared/models'
 import {
@@ -10,7 +10,6 @@ import {
   createSingleServer,
   findExternalSavedVideo,
   makeRawRequest,
-  parseTorrentVideo,
   PeerTubeServer,
   sendRTMPStream,
   setAccessTokensToServers,
@@ -256,10 +255,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 })
 
@@ -365,13 +363,21 @@ describe('Test video static file privacy', function () {
       })
 
       {
-        const { video, live } = await server.live.quickCreate({ saveReplay: true, permanentLive: false, privacy: VideoPrivacy.PRIVATE })
+        const { video, live } = await server.live.quickCreate({
+          saveReplay: true,
+          permanentLive: false,
+          privacy: VideoPrivacy.PRIVATE
+        })
         normalLiveId = video.uuid
         normalLive = live
       }
 
       {
-        const { video, live } = await server.live.quickCreate({ saveReplay: true, permanentLive: true, privacy: VideoPrivacy.PRIVATE })
+        const { video, live } = await server.live.quickCreate({
+          saveReplay: true,
+          permanentLive: true,
+          privacy: VideoPrivacy.PRIVATE
+        })
         permanentLiveId = video.uuid
         permanentLive = live
       }