From c8fa571f32b10c083fab07f28d2ef55895ef40af Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 22 Jul 2022 15:22:21 +0200 Subject: Clearer live session Get the save replay setting when the session started to prevent inconsistent behaviour when the setting changed before the session was processed by the live ending job Display more information about the potential session replay in live modal information --- server/tests/api/live/live-save-replay.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'server/tests/api/live') diff --git a/server/tests/api/live/live-save-replay.ts b/server/tests/api/live/live-save-replay.ts index 99ad3b2e1..b89aed85a 100644 --- a/server/tests/api/live/live-save-replay.ts +++ b/server/tests/api/live/live-save-replay.ts @@ -206,6 +206,7 @@ describe('Save replay setting', function () { expect(session.endDate).to.exist expect(new Date(session.endDate)).to.be.above(sessionEndDateMin) + expect(session.saveReplay).to.be.false expect(session.error).to.not.exist expect(session.replayVideo).to.not.exist }) @@ -272,6 +273,11 @@ describe('Save replay setting', function () { it('Should correctly have saved the live and federated it after the streaming', async function () { this.timeout(30000) + const session = await servers[0].live.findLatestSession({ videoId: liveVideoUUID }) + expect(session.endDate).to.not.exist + expect(session.endingProcessed).to.be.false + expect(session.saveReplay).to.be.true + await stopFfmpeg(ffmpegCommand) await waitUntilLiveReplacedByReplayOnAllServers(servers, liveVideoUUID) @@ -291,6 +297,8 @@ describe('Save replay setting', function () { expect(session.endDate).to.exist expect(session.error).to.not.exist + expect(session.saveReplay).to.be.true + expect(session.endingProcessed).to.be.true expect(session.replayVideo).to.exist expect(session.replayVideo.id).to.exist -- cgit v1.2.3