diff options
author | Chocobozzz <me@florianbigard.com> | 2022-05-25 15:22:28 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-05-25 15:22:28 +0200 |
commit | ab623c0e0b4815bd69a94887241a69aaa857ed26 (patch) | |
tree | 9140675d0aa501d9ddbbcf14bbdb5c28b6ef0712 /server/tests/api/live/live-save-replay.ts | |
parent | c501cdef27e6769b7d2a13ac7b6deeb2e61eee46 (diff) | |
parent | c8fdfab0e36cc7324c61710009bf334e836485d9 (diff) | |
download | PeerTube-ab623c0e0b4815bd69a94887241a69aaa857ed26.tar.gz PeerTube-ab623c0e0b4815bd69a94887241a69aaa857ed26.tar.zst PeerTube-ab623c0e0b4815bd69a94887241a69aaa857ed26.zip |
Merge branch 'release/4.2.0' into develop
Diffstat (limited to 'server/tests/api/live/live-save-replay.ts')
-rw-r--r-- | server/tests/api/live/live-save-replay.ts | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/server/tests/api/live/live-save-replay.ts b/server/tests/api/live/live-save-replay.ts index 7ddcb04ef..007af51e9 100644 --- a/server/tests/api/live/live-save-replay.ts +++ b/server/tests/api/live/live-save-replay.ts | |||
@@ -441,6 +441,40 @@ describe('Save replay setting', function () { | |||
441 | await checkVideosExist(liveVideoUUID, false, HttpStatusCode.NOT_FOUND_404) | 441 | await checkVideosExist(liveVideoUUID, false, HttpStatusCode.NOT_FOUND_404) |
442 | await checkLiveCleanup(servers[0], liveVideoUUID, []) | 442 | await checkLiveCleanup(servers[0], liveVideoUUID, []) |
443 | }) | 443 | }) |
444 | |||
445 | it('Should correctly save replays with multiple sessions', async function () { | ||
446 | this.timeout(120000) | ||
447 | |||
448 | liveVideoUUID = await createLiveWrapper({ permanent: true, replay: true }) | ||
449 | await waitJobs(servers) | ||
450 | |||
451 | // Streaming session #1 | ||
452 | ffmpegCommand = await servers[0].live.sendRTMPStreamInVideo({ videoId: liveVideoUUID }) | ||
453 | await waitUntilLivePublishedOnAllServers(servers, liveVideoUUID) | ||
454 | await stopFfmpeg(ffmpegCommand) | ||
455 | await servers[0].live.waitUntilWaiting({ videoId: liveVideoUUID }) | ||
456 | |||
457 | // Streaming session #2 | ||
458 | ffmpegCommand = await servers[0].live.sendRTMPStreamInVideo({ videoId: liveVideoUUID }) | ||
459 | await waitUntilLivePublishedOnAllServers(servers, liveVideoUUID) | ||
460 | await stopFfmpeg(ffmpegCommand) | ||
461 | await waitUntilLiveWaitingOnAllServers(servers, liveVideoUUID) | ||
462 | |||
463 | // Wait for replays | ||
464 | await waitJobs(servers) | ||
465 | |||
466 | const { total, data: sessions } = await servers[0].live.listSessions({ videoId: liveVideoUUID }) | ||
467 | |||
468 | expect(total).to.equal(2) | ||
469 | expect(sessions).to.have.lengthOf(2) | ||
470 | |||
471 | for (const session of sessions) { | ||
472 | expect(session.error).to.be.null | ||
473 | expect(session.replayVideo).to.exist | ||
474 | |||
475 | await servers[0].videos.get({ id: session.replayVideo.uuid }) | ||
476 | } | ||
477 | }) | ||
444 | }) | 478 | }) |
445 | 479 | ||
446 | after(async function () { | 480 | after(async function () { |