aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/live/live.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-05-03 11:38:07 +0200
committerChocobozzz <me@florianbigard.com>2022-05-03 14:49:15 +0200
commit26e3e98ff0e222a9fb9226938ac6902af77921bd (patch)
tree73d1c6f2524e380862d3365f12043fc319d40841 /server/tests/api/live/live.ts
parent86c5229b4d726202378ef46854383bcafca22310 (diff)
downloadPeerTube-26e3e98ff0e222a9fb9226938ac6902af77921bd.tar.gz
PeerTube-26e3e98ff0e222a9fb9226938ac6902af77921bd.tar.zst
PeerTube-26e3e98ff0e222a9fb9226938ac6902af77921bd.zip
Support live session in server
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 () {