aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/live/live.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-07 11:51:09 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:17 +0200
commit65e6e2602c0d5521f3a6740f7469bb92830ecb53 (patch)
treef89024ffff1dafb0281ee2fe028e89b95101bd44 /server/tests/api/live/live.ts
parentbc8090411ddaa8d742ce4de3c83f9dba7bc18e2a (diff)
downloadPeerTube-65e6e2602c0d5521f3a6740f7469bb92830ecb53.tar.gz
PeerTube-65e6e2602c0d5521f3a6740f7469bb92830ecb53.tar.zst
PeerTube-65e6e2602c0d5521f3a6740f7469bb92830ecb53.zip
Introduce config command
Diffstat (limited to 'server/tests/api/live/live.ts')
-rw-r--r--server/tests/api/live/live.ts43
1 files changed, 23 insertions, 20 deletions
diff --git a/server/tests/api/live/live.ts b/server/tests/api/live/live.ts
index 50397924e..2c3102994 100644
--- a/server/tests/api/live/live.ts
+++ b/server/tests/api/live/live.ts
@@ -34,7 +34,6 @@ import {
34 stopFfmpeg, 34 stopFfmpeg,
35 testFfmpegStreamError, 35 testFfmpegStreamError,
36 testImage, 36 testImage,
37 updateCustomSubConfig,
38 updateLive, 37 updateLive,
39 uploadVideoAndGetId, 38 uploadVideoAndGetId,
40 wait, 39 wait,
@@ -59,12 +58,14 @@ describe('Test live', function () {
59 await setAccessTokensToServers(servers) 58 await setAccessTokensToServers(servers)
60 await setDefaultVideoChannel(servers) 59 await setDefaultVideoChannel(servers)
61 60
62 await updateCustomSubConfig(servers[0].url, servers[0].accessToken, { 61 await servers[0].configCommand.updateCustomSubConfig({
63 live: { 62 newConfig: {
64 enabled: true, 63 live: {
65 allowReplay: true, 64 enabled: true,
66 transcoding: { 65 allowReplay: true,
67 enabled: false 66 transcoding: {
67 enabled: false
68 }
68 } 69 }
69 } 70 }
70 }) 71 })
@@ -422,20 +423,22 @@ describe('Test live', function () {
422 } 423 }
423 424
424 function updateConf (resolutions: number[]) { 425 function updateConf (resolutions: number[]) {
425 return updateCustomSubConfig(servers[0].url, servers[0].accessToken, { 426 return servers[0].configCommand.updateCustomSubConfig({
426 live: { 427 newConfig: {
427 enabled: true, 428 live: {
428 allowReplay: true,
429 maxDuration: -1,
430 transcoding: {
431 enabled: true, 429 enabled: true,
432 resolutions: { 430 allowReplay: true,
433 '240p': resolutions.includes(240), 431 maxDuration: -1,
434 '360p': resolutions.includes(360), 432 transcoding: {
435 '480p': resolutions.includes(480), 433 enabled: true,
436 '720p': resolutions.includes(720), 434 resolutions: {
437 '1080p': resolutions.includes(1080), 435 '240p': resolutions.includes(240),
438 '2160p': resolutions.includes(2160) 436 '360p': resolutions.includes(360),
437 '480p': resolutions.includes(480),
438 '720p': resolutions.includes(720),
439 '1080p': resolutions.includes(1080),
440 '2160p': resolutions.includes(2160)
441 }
439 } 442 }
440 } 443 }
441 } 444 }