let permanentLiveReplayName: string
+ let beforeServerRestart: Date
+
async function createLiveWrapper (options: { saveReplay: boolean, permanent: boolean }) {
const liveAttributes: LiveVideoCreate = {
name: 'live video',
}
await killallServers([ servers[0] ])
+
+ beforeServerRestart = new Date()
await servers[0].run()
await wait(5000)
})
it('Should save a non permanent live replay', async function () {
- this.timeout(120000)
+ this.timeout(240000)
await commands[0].waitUntilPublished({ videoId: liveVideoReplayId })
+
+ const session = await commands[0].getReplaySession({ videoId: liveVideoReplayId })
+ expect(session.endDate).to.exist
+ expect(new Date(session.endDate)).to.be.above(beforeServerRestart)
})
it('Should have saved a permanent live replay', async function () {