]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/live/live-permanent.ts
Support live session in server
[github/Chocobozzz/PeerTube.git] / server / tests / api / live / live-permanent.ts
index a88d71dd99d4d96d80655c59b0b0cec6ecfd459f..92eac9e5f4d3c51bd564bb5a9e6cd0e4b77db1be 100644 (file)
@@ -172,6 +172,23 @@ describe('Permanent live', function () {
     await stopFfmpeg(ffmpegCommand)
   })
 
+  it('Should have appropriate sessions', async function () {
+    this.timeout(60000)
+
+    await servers[0].live.waitUntilWaiting({ videoId: videoUUID })
+
+    const { data, total } = await servers[0].live.listSessions({ videoId: videoUUID })
+    expect(total).to.equal(2)
+    expect(data).to.have.lengthOf(2)
+
+    for (const session of data) {
+      expect(session.startDate).to.exist
+      expect(session.endDate).to.exist
+
+      expect(session.error).to.not.exist
+    }
+  })
+
   after(async function () {
     await cleanupTests(servers)
   })