]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/live/live-permanent.ts
Merge remote-tracking branch 'weblate/develop' into develop
[github/Chocobozzz/PeerTube.git] / server / tests / api / live / live-permanent.ts
index f07d4cfecc7936b0df884abf4bd3da323ae45bdf..3e6fec45396d89a450b9c5e2cd152303b0aa3fe4 100644 (file)
@@ -2,6 +2,7 @@
 
 import 'mocha'
 import * as chai from 'chai'
+import { wait } from '@shared/core-utils'
 import { LiveVideoCreate, VideoPrivacy, VideoState } from '@shared/models'
 import {
   cleanupTests,
@@ -12,9 +13,8 @@ import {
   setAccessTokensToServers,
   setDefaultVideoChannel,
   stopFfmpeg,
-  wait,
   waitJobs
-} from '../../../../shared/extra-utils'
+} from '@shared/server-commands'
 
 const expect = chai.expect
 
@@ -101,6 +101,7 @@ describe('Permanent live', function () {
   it('Should stream into this permanent live', async function () {
     this.timeout(120000)
 
+    const beforePublication = new Date()
     const ffmpegCommand = await servers[0].live.sendRTMPStreamInVideo({ videoId: videoUUID })
 
     for (const server of servers) {
@@ -109,6 +110,11 @@ describe('Permanent live', function () {
 
     await checkVideoState(videoUUID, VideoState.PUBLISHED)
 
+    for (const server of servers) {
+      const video = await server.videos.get({ id: videoUUID })
+      expect(new Date(video.publishedAt)).greaterThan(beforePublication)
+    }
+
     await stopFfmpeg(ffmpegCommand)
     await servers[0].live.waitUntilWaiting({ videoId: videoUUID })
 
@@ -134,7 +140,7 @@ describe('Permanent live', function () {
   })
 
   it('Should be able to stream again in the permanent live', async function () {
-    this.timeout(20000)
+    this.timeout(60000)
 
     await servers[0].config.updateCustomSubConfig({
       newConfig: {