aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/live/live.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/live/live.ts')
-rw-r--r--server/tests/api/live/live.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/server/tests/api/live/live.ts b/server/tests/api/live/live.ts
index ab7251e31..9b8fbe3e2 100644
--- a/server/tests/api/live/live.ts
+++ b/server/tests/api/live/live.ts
@@ -594,6 +594,8 @@ describe('Test live', function () {
594 594
595 let permanentLiveReplayName: string 595 let permanentLiveReplayName: string
596 596
597 let beforeServerRestart: Date
598
597 async function createLiveWrapper (options: { saveReplay: boolean, permanent: boolean }) { 599 async function createLiveWrapper (options: { saveReplay: boolean, permanent: boolean }) {
598 const liveAttributes: LiveVideoCreate = { 600 const liveAttributes: LiveVideoCreate = {
599 name: 'live video', 601 name: 'live video',
@@ -636,6 +638,8 @@ describe('Test live', function () {
636 } 638 }
637 639
638 await killallServers([ servers[0] ]) 640 await killallServers([ servers[0] ])
641
642 beforeServerRestart = new Date()
639 await servers[0].run() 643 await servers[0].run()
640 644
641 await wait(5000) 645 await wait(5000)
@@ -653,6 +657,10 @@ describe('Test live', function () {
653 this.timeout(120000) 657 this.timeout(120000)
654 658
655 await commands[0].waitUntilPublished({ videoId: liveVideoReplayId }) 659 await commands[0].waitUntilPublished({ videoId: liveVideoReplayId })
660
661 const session = await commands[0].getReplaySession({ videoId: liveVideoReplayId })
662 expect(session.endDate).to.exist
663 expect(new Date(session.endDate)).to.be.above(beforeServerRestart)
656 }) 664 })
657 665
658 it('Should have saved a permanent live replay', async function () { 666 it('Should have saved a permanent live replay', async function () {