]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/live/live-fast-restream.ts
Fix reset sequelize instance
[github/Chocobozzz/PeerTube.git] / server / tests / api / live / live-fast-restream.ts
index f6959b83cf6519c43794c7d9956afcfd1191acaf..2169393c27fc0931caf8229d7726bd0af2e37083 100644 (file)
@@ -2,11 +2,10 @@
 
 import { expect } from 'chai'
 import { wait } from '@shared/core-utils'
-import { HttpStatusCode, LiveVideoCreate, VideoPrivacy } from '@shared/models'
+import { LiveVideoCreate, VideoPrivacy } from '@shared/models'
 import {
   cleanupTests,
   createSingleServer,
-  makeRawRequest,
   PeerTubeServer,
   setAccessTokensToServers,
   setDefaultVideoChannel,
@@ -23,6 +22,7 @@ describe('Fast restream in live', function () {
       privacy: VideoPrivacy.PUBLIC,
       name: 'my super live',
       saveReplay: options.replay,
+      replaySettings: options.replay ? { privacy: VideoPrivacy.PUBLIC } : undefined,
       permanentLive: options.permanent
     }
 
@@ -80,8 +80,8 @@ describe('Fast restream in live', function () {
 
       try {
         await server.live.getSegmentFile({ videoUUID: liveId, segment: 0, playlistNumber: 0 })
-        await makeRawRequest({ url: video.streamingPlaylists[0].playlistUrl, expectedStatus: HttpStatusCode.OK_200 })
-        await makeRawRequest({ url: video.streamingPlaylists[0].segmentsSha256Url, expectedStatus: HttpStatusCode.OK_200 })
+        await server.streamingPlaylists.get({ url: video.streamingPlaylists[0].playlistUrl })
+        await server.streamingPlaylists.getSegmentSha256({ url: video.streamingPlaylists[0].segmentsSha256Url })
       } catch (err) {
         // FIXME: try to debug error in CI "Unexpected end of JSON input"
         console.error(err)
@@ -95,6 +95,9 @@ describe('Fast restream in live', function () {
   async function runTest (replay: boolean) {
     const { ffmpegCommand, liveVideoUUID } = await fastRestreamWrapper({ replay })
 
+    // TODO: remove, we try to debug a test timeout failure here
+    console.log('Ensuring last live works')
+
     await ensureLastLiveWorks(liveVideoUUID)
 
     await stopFfmpeg(ffmpegCommand)