]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/live/live-views.ts
Introduce blacklist command
[github/Chocobozzz/PeerTube.git] / server / tests / api / live / live-views.ts
index a44d21ffa45cd7c4503a48130f3806e7e67fdac4..75f95b167b624708d554a53eeb8eedd2a28a8ee9 100644 (file)
@@ -6,16 +6,13 @@ import { FfmpegCommand } from 'fluent-ffmpeg'
 import { VideoDetails, VideoPrivacy } from '@shared/models'
 import {
   cleanupTests,
-  createLive,
   doubleFollow,
   flushAndRunMultipleServers,
   getVideo,
-  sendRTMPStreamInVideo,
   ServerInfo,
   setAccessTokensToServers,
   setDefaultVideoChannel,
   stopFfmpeg,
-  updateCustomSubConfig,
   viewVideo,
   wait,
   waitJobs,
@@ -36,12 +33,14 @@ describe('Test live', function () {
     await setAccessTokensToServers(servers)
     await setDefaultVideoChannel(servers)
 
-    await updateCustomSubConfig(servers[0].url, servers[0].accessToken, {
-      live: {
-        enabled: true,
-        allowReplay: true,
-        transcoding: {
-          enabled: false
+    await servers[0].configCommand.updateCustomSubConfig({
+      newConfig: {
+        live: {
+          enabled: true,
+          allowReplay: true,
+          transcoding: {
+            enabled: false
+          }
         }
       }
     })
@@ -72,10 +71,10 @@ describe('Test live', function () {
         privacy: VideoPrivacy.PUBLIC
       }
 
-      const res = await createLive(servers[0].url, servers[0].accessToken, liveAttributes)
-      liveVideoId = res.body.video.uuid
+      const live = await servers[0].liveCommand.create({ fields: liveAttributes })
+      liveVideoId = live.uuid
 
-      command = await sendRTMPStreamInVideo(servers[0].url, servers[0].accessToken, liveVideoId)
+      command = await servers[0].liveCommand.sendRTMPStreamInVideo({ videoId: liveVideoId })
       await waitUntilLivePublishedOnAllServers(servers, liveVideoId)
       await waitJobs(servers)
     })