aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/live/live-save-replay.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/live/live-save-replay.ts')
-rw-r--r--server/tests/api/live/live-save-replay.ts28
1 files changed, 15 insertions, 13 deletions
diff --git a/server/tests/api/live/live-save-replay.ts b/server/tests/api/live/live-save-replay.ts
index 676d0af69..2a44cb5a0 100644
--- a/server/tests/api/live/live-save-replay.ts
+++ b/server/tests/api/live/live-save-replay.ts
@@ -153,7 +153,7 @@ describe('Save replay setting', function () {
153 let sessionEndDateMin: Date 153 let sessionEndDateMin: Date
154 154
155 it('Should correctly create and federate the "waiting for stream" live', async function () { 155 it('Should correctly create and federate the "waiting for stream" live', async function () {
156 this.timeout(20000) 156 this.timeout(40000)
157 157
158 liveVideoUUID = await createLiveWrapper({ permanent: false, replay: false }) 158 liveVideoUUID = await createLiveWrapper({ permanent: false, replay: false })
159 159
@@ -164,7 +164,7 @@ describe('Save replay setting', function () {
164 }) 164 })
165 165
166 it('Should correctly have updated the live and federated it when streaming in the live', async function () { 166 it('Should correctly have updated the live and federated it when streaming in the live', async function () {
167 this.timeout(30000) 167 this.timeout(40000)
168 168
169 ffmpegCommand = await servers[0].live.sendRTMPStreamInVideo({ videoId: liveVideoUUID }) 169 ffmpegCommand = await servers[0].live.sendRTMPStreamInVideo({ videoId: liveVideoUUID })
170 170
@@ -253,7 +253,7 @@ describe('Save replay setting', function () {
253 describe('With save replay enabled on non permanent live', function () { 253 describe('With save replay enabled on non permanent live', function () {
254 254
255 it('Should correctly create and federate the "waiting for stream" live', async function () { 255 it('Should correctly create and federate the "waiting for stream" live', async function () {
256 this.timeout(20000) 256 this.timeout(40000)
257 257
258 liveVideoUUID = await createLiveWrapper({ permanent: false, replay: true, replaySettings: { privacy: VideoPrivacy.UNLISTED } }) 258 liveVideoUUID = await createLiveWrapper({ permanent: false, replay: true, replaySettings: { privacy: VideoPrivacy.UNLISTED } })
259 259
@@ -265,7 +265,7 @@ describe('Save replay setting', function () {
265 }) 265 })
266 266
267 it('Should correctly have updated the live and federated it when streaming in the live', async function () { 267 it('Should correctly have updated the live and federated it when streaming in the live', async function () {
268 this.timeout(20000) 268 this.timeout(40000)
269 269
270 ffmpegCommand = await servers[0].live.sendRTMPStreamInVideo({ videoId: liveVideoUUID }) 270 ffmpegCommand = await servers[0].live.sendRTMPStreamInVideo({ videoId: liveVideoUUID })
271 await waitUntilLivePublishedOnAllServers(servers, liveVideoUUID) 271 await waitUntilLivePublishedOnAllServers(servers, liveVideoUUID)
@@ -278,7 +278,7 @@ describe('Save replay setting', function () {
278 }) 278 })
279 279
280 it('Should correctly have saved the live and federated it after the streaming', async function () { 280 it('Should correctly have saved the live and federated it after the streaming', async function () {
281 this.timeout(30000) 281 this.timeout(40000)
282 282
283 const session = await servers[0].live.findLatestSession({ videoId: liveVideoUUID }) 283 const session = await servers[0].live.findLatestSession({ videoId: liveVideoUUID })
284 expect(session.endDate).to.not.exist 284 expect(session.endDate).to.not.exist
@@ -319,7 +319,7 @@ describe('Save replay setting', function () {
319 }) 319 })
320 320
321 it('Should update the saved live and correctly federate the updated attributes', async function () { 321 it('Should update the saved live and correctly federate the updated attributes', async function () {
322 this.timeout(30000) 322 this.timeout(40000)
323 323
324 await servers[0].videos.update({ id: liveVideoUUID, attributes: { name: 'video updated', privacy: VideoPrivacy.PUBLIC } }) 324 await servers[0].videos.update({ id: liveVideoUUID, attributes: { name: 'video updated', privacy: VideoPrivacy.PUBLIC } })
325 await waitJobs(servers) 325 await waitJobs(servers)
@@ -367,7 +367,7 @@ describe('Save replay setting', function () {
367 describe('With a first live and its replay', function () { 367 describe('With a first live and its replay', function () {
368 368
369 it('Should correctly create and federate the "waiting for stream" live', async function () { 369 it('Should correctly create and federate the "waiting for stream" live', async function () {
370 this.timeout(20000) 370 this.timeout(40000)
371 371
372 liveVideoUUID = await createLiveWrapper({ permanent: true, replay: true, replaySettings: { privacy: VideoPrivacy.UNLISTED } }) 372 liveVideoUUID = await createLiveWrapper({ permanent: true, replay: true, replaySettings: { privacy: VideoPrivacy.UNLISTED } })
373 373
@@ -379,7 +379,7 @@ describe('Save replay setting', function () {
379 }) 379 })
380 380
381 it('Should correctly have updated the live and federated it when streaming in the live', async function () { 381 it('Should correctly have updated the live and federated it when streaming in the live', async function () {
382 this.timeout(20000) 382 this.timeout(40000)
383 383
384 ffmpegCommand = await servers[0].live.sendRTMPStreamInVideo({ videoId: liveVideoUUID }) 384 ffmpegCommand = await servers[0].live.sendRTMPStreamInVideo({ videoId: liveVideoUUID })
385 await waitUntilLivePublishedOnAllServers(servers, liveVideoUUID) 385 await waitUntilLivePublishedOnAllServers(servers, liveVideoUUID)
@@ -392,7 +392,7 @@ describe('Save replay setting', function () {
392 }) 392 })
393 393
394 it('Should correctly have saved the live and federated it after the streaming', async function () { 394 it('Should correctly have saved the live and federated it after the streaming', async function () {
395 this.timeout(30000) 395 this.timeout(40000)
396 396
397 const liveDetails = await servers[0].videos.get({ id: liveVideoUUID }) 397 const liveDetails = await servers[0].videos.get({ id: liveVideoUUID })
398 398
@@ -443,10 +443,11 @@ describe('Save replay setting', function () {
443 }) 443 })
444 444
445 describe('With a second live and its replay', function () { 445 describe('With a second live and its replay', function () {
446
446 it('Should update the replay settings', async function () { 447 it('Should update the replay settings', async function () {
447 await servers[0].live.update( 448 await servers[0].live.update({ videoId: liveVideoUUID, fields: { replaySettings: { privacy: VideoPrivacy.PUBLIC } } })
448 { videoId: liveVideoUUID, fields: { replaySettings: { privacy: VideoPrivacy.PUBLIC } } })
449 await waitJobs(servers) 449 await waitJobs(servers)
450
450 const live = await servers[0].live.get({ videoId: liveVideoUUID }) 451 const live = await servers[0].live.get({ videoId: liveVideoUUID })
451 452
452 expect(live.saveReplay).to.be.true 453 expect(live.saveReplay).to.be.true
@@ -456,7 +457,7 @@ describe('Save replay setting', function () {
456 }) 457 })
457 458
458 it('Should correctly have updated the live and federated it when streaming in the live', async function () { 459 it('Should correctly have updated the live and federated it when streaming in the live', async function () {
459 this.timeout(20000) 460 this.timeout(40000)
460 461
461 ffmpegCommand = await servers[0].live.sendRTMPStreamInVideo({ videoId: liveVideoUUID }) 462 ffmpegCommand = await servers[0].live.sendRTMPStreamInVideo({ videoId: liveVideoUUID })
462 await waitUntilLivePublishedOnAllServers(servers, liveVideoUUID) 463 await waitUntilLivePublishedOnAllServers(servers, liveVideoUUID)
@@ -469,7 +470,8 @@ describe('Save replay setting', function () {
469 }) 470 })
470 471
471 it('Should correctly have saved the live and federated it after the streaming', async function () { 472 it('Should correctly have saved the live and federated it after the streaming', async function () {
472 this.timeout(30000) 473 this.timeout(40000)
474
473 const liveDetails = await servers[0].videos.get({ id: liveVideoUUID }) 475 const liveDetails = await servers[0].videos.get({ id: liveVideoUUID })
474 476
475 await stopFfmpeg(ffmpegCommand) 477 await stopFfmpeg(ffmpegCommand)