diff options
author | Chocobozzz <me@florianbigard.com> | 2019-11-15 15:06:03 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-11-25 10:59:43 +0100 |
commit | d7a25329f9e607894d29ab342b9cb66638b56dc0 (patch) | |
tree | 6cd6bc4f2689f78944238b313c93427423a932ac /server/tests/api/check-params | |
parent | 14981d7331da3f63fe6cfaf020ccb7c910006eaf (diff) | |
download | PeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.tar.gz PeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.tar.zst PeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.zip |
Add ability to disable webtorrent
In favour of HLS
Diffstat (limited to 'server/tests/api/check-params')
-rw-r--r-- | server/tests/api/check-params/config.ts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts index 9435bb1e8..3c558d4ea 100644 --- a/server/tests/api/check-params/config.ts +++ b/server/tests/api/check-params/config.ts | |||
@@ -92,6 +92,9 @@ describe('Test config API validators', function () { | |||
92 | '1080p': false, | 92 | '1080p': false, |
93 | '2160p': false | 93 | '2160p': false |
94 | }, | 94 | }, |
95 | webtorrent: { | ||
96 | enabled: true | ||
97 | }, | ||
95 | hls: { | 98 | hls: { |
96 | enabled: false | 99 | enabled: false |
97 | } | 100 | } |
@@ -235,6 +238,27 @@ describe('Test config API validators', function () { | |||
235 | }) | 238 | }) |
236 | }) | 239 | }) |
237 | 240 | ||
241 | it('Should fail with a disabled webtorrent & hls transcoding', async function () { | ||
242 | const newUpdateParams = immutableAssign(updateParams, { | ||
243 | transcoding: { | ||
244 | hls: { | ||
245 | enabled: false | ||
246 | }, | ||
247 | webtorrent: { | ||
248 | enabled: false | ||
249 | } | ||
250 | } | ||
251 | }) | ||
252 | |||
253 | await makePutBodyRequest({ | ||
254 | url: server.url, | ||
255 | path, | ||
256 | fields: newUpdateParams, | ||
257 | token: server.accessToken, | ||
258 | statusCodeExpected: 400 | ||
259 | }) | ||
260 | }) | ||
261 | |||
238 | it('Should success with the correct parameters', async function () { | 262 | it('Should success with the correct parameters', async function () { |
239 | await makePutBodyRequest({ | 263 | await makePutBodyRequest({ |
240 | url: server.url, | 264 | url: server.url, |