aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/live/live-constraints.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-constraints.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-constraints.ts')
-rw-r--r--server/tests/api/live/live-constraints.ts33
1 files changed, 18 insertions, 15 deletions
diff --git a/server/tests/api/live/live-constraints.ts b/server/tests/api/live/live-constraints.ts
index cc635de33..c64d10dcd 100644
--- a/server/tests/api/live/live-constraints.ts
+++ b/server/tests/api/live/live-constraints.ts
@@ -6,17 +6,16 @@ import { VideoDetails, VideoPrivacy } from '@shared/models'
6import { 6import {
7 checkLiveCleanup, 7 checkLiveCleanup,
8 cleanupTests, 8 cleanupTests,
9 ConfigCommand,
9 createLive, 10 createLive,
10 doubleFollow, 11 doubleFollow,
11 flushAndRunMultipleServers, 12 flushAndRunMultipleServers,
12 generateUser, 13 generateUser,
13 getCustomConfigResolutions,
14 getVideo, 14 getVideo,
15 runAndTestFfmpegStreamError, 15 runAndTestFfmpegStreamError,
16 ServerInfo, 16 ServerInfo,
17 setAccessTokensToServers, 17 setAccessTokensToServers,
18 setDefaultVideoChannel, 18 setDefaultVideoChannel,
19 updateCustomSubConfig,
20 updateUser, 19 updateUser,
21 wait, 20 wait,
22 waitJobs, 21 waitJobs,
@@ -80,12 +79,14 @@ describe('Test live constraints', function () {
80 await setAccessTokensToServers(servers) 79 await setAccessTokensToServers(servers)
81 await setDefaultVideoChannel(servers) 80 await setDefaultVideoChannel(servers)
82 81
83 await updateCustomSubConfig(servers[0].url, servers[0].accessToken, { 82 await servers[0].configCommand.updateCustomSubConfig({
84 live: { 83 newConfig: {
85 enabled: true, 84 live: {
86 allowReplay: true, 85 enabled: true,
87 transcoding: { 86 allowReplay: true,
88 enabled: false 87 transcoding: {
88 enabled: false
89 }
89 } 90 }
90 } 91 }
91 }) 92 })
@@ -157,14 +158,16 @@ describe('Test live constraints', function () {
157 it('Should have max duration limit', async function () { 158 it('Should have max duration limit', async function () {
158 this.timeout(60000) 159 this.timeout(60000)
159 160
160 await updateCustomSubConfig(servers[0].url, servers[0].accessToken, { 161 await servers[0].configCommand.updateCustomSubConfig({
161 live: { 162 newConfig: {
162 enabled: true, 163 live: {
163 allowReplay: true,
164 maxDuration: 1,
165 transcoding: {
166 enabled: true, 164 enabled: true,
167 resolutions: getCustomConfigResolutions(true) 165 allowReplay: true,
166 maxDuration: 1,
167 transcoding: {
168 enabled: true,
169 resolutions: ConfigCommand.getCustomConfigResolutions(true)
170 }
168 } 171 }
169 } 172 }
170 }) 173 })