diff options
author | Chocobozzz <me@florianbigard.com> | 2022-07-22 15:22:21 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-07-22 15:22:21 +0200 |
commit | c8fa571f32b10c083fab07f28d2ef55895ef40af (patch) | |
tree | fd50f90cc7643333984ed3b19f6a06f2e9f54feb /server/tests/api/live | |
parent | a77c5ff3622ab75d0c22241d0ef72053deaa7926 (diff) | |
download | PeerTube-c8fa571f32b10c083fab07f28d2ef55895ef40af.tar.gz PeerTube-c8fa571f32b10c083fab07f28d2ef55895ef40af.tar.zst PeerTube-c8fa571f32b10c083fab07f28d2ef55895ef40af.zip |
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
Diffstat (limited to 'server/tests/api/live')
-rw-r--r-- | server/tests/api/live/live-save-replay.ts | 8 |
1 files changed, 8 insertions, 0 deletions
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 () { | |||
206 | expect(session.endDate).to.exist | 206 | expect(session.endDate).to.exist |
207 | expect(new Date(session.endDate)).to.be.above(sessionEndDateMin) | 207 | expect(new Date(session.endDate)).to.be.above(sessionEndDateMin) |
208 | 208 | ||
209 | expect(session.saveReplay).to.be.false | ||
209 | expect(session.error).to.not.exist | 210 | expect(session.error).to.not.exist |
210 | expect(session.replayVideo).to.not.exist | 211 | expect(session.replayVideo).to.not.exist |
211 | }) | 212 | }) |
@@ -272,6 +273,11 @@ describe('Save replay setting', function () { | |||
272 | it('Should correctly have saved the live and federated it after the streaming', async function () { | 273 | it('Should correctly have saved the live and federated it after the streaming', async function () { |
273 | this.timeout(30000) | 274 | this.timeout(30000) |
274 | 275 | ||
276 | const session = await servers[0].live.findLatestSession({ videoId: liveVideoUUID }) | ||
277 | expect(session.endDate).to.not.exist | ||
278 | expect(session.endingProcessed).to.be.false | ||
279 | expect(session.saveReplay).to.be.true | ||
280 | |||
275 | await stopFfmpeg(ffmpegCommand) | 281 | await stopFfmpeg(ffmpegCommand) |
276 | 282 | ||
277 | await waitUntilLiveReplacedByReplayOnAllServers(servers, liveVideoUUID) | 283 | await waitUntilLiveReplacedByReplayOnAllServers(servers, liveVideoUUID) |
@@ -291,6 +297,8 @@ describe('Save replay setting', function () { | |||
291 | expect(session.endDate).to.exist | 297 | expect(session.endDate).to.exist |
292 | 298 | ||
293 | expect(session.error).to.not.exist | 299 | expect(session.error).to.not.exist |
300 | expect(session.saveReplay).to.be.true | ||
301 | expect(session.endingProcessed).to.be.true | ||
294 | 302 | ||
295 | expect(session.replayVideo).to.exist | 303 | expect(session.replayVideo).to.exist |
296 | expect(session.replayVideo.id).to.exist | 304 | expect(session.replayVideo.id).to.exist |