aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-05-25 15:22:28 +0200
committerChocobozzz <me@florianbigard.com>2022-05-25 15:22:28 +0200
commitab623c0e0b4815bd69a94887241a69aaa857ed26 (patch)
tree9140675d0aa501d9ddbbcf14bbdb5c28b6ef0712 /server/tests/api
parentc501cdef27e6769b7d2a13ac7b6deeb2e61eee46 (diff)
parentc8fdfab0e36cc7324c61710009bf334e836485d9 (diff)
downloadPeerTube-ab623c0e0b4815bd69a94887241a69aaa857ed26.tar.gz
PeerTube-ab623c0e0b4815bd69a94887241a69aaa857ed26.tar.zst
PeerTube-ab623c0e0b4815bd69a94887241a69aaa857ed26.zip
Merge branch 'release/4.2.0' into develop
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/live/live-save-replay.ts34
-rw-r--r--server/tests/api/live/live-socket-messages.ts2
2 files changed, 35 insertions, 1 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 () {
diff --git a/server/tests/api/live/live-socket-messages.ts b/server/tests/api/live/live-socket-messages.ts
index 7668ed5b9..1669369c0 100644
--- a/server/tests/api/live/live-socket-messages.ts
+++ b/server/tests/api/live/live-socket-messages.ts
@@ -18,7 +18,7 @@ import {
18 18
19const expect = chai.expect 19const expect = chai.expect
20 20
21describe('Test live', function () { 21describe('Test live socket messages', function () {
22 let servers: PeerTubeServer[] = [] 22 let servers: PeerTubeServer[] = []
23 23
24 before(async function () { 24 before(async function () {