From d7a25329f9e607894d29ab342b9cb66638b56dc0 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 15 Nov 2019 15:06:03 +0100 Subject: Add ability to disable webtorrent In favour of HLS --- server/tests/api/check-params/config.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'server/tests/api/check-params') 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 () { '1080p': false, '2160p': false }, + webtorrent: { + enabled: true + }, hls: { enabled: false } @@ -235,6 +238,27 @@ describe('Test config API validators', function () { }) }) + it('Should fail with a disabled webtorrent & hls transcoding', async function () { + const newUpdateParams = immutableAssign(updateParams, { + transcoding: { + hls: { + enabled: false + }, + webtorrent: { + enabled: false + } + } + }) + + await makePutBodyRequest({ + url: server.url, + path, + fields: newUpdateParams, + token: server.accessToken, + statusCodeExpected: 400 + }) + }) + it('Should success with the correct parameters', async function () { await makePutBodyRequest({ url: server.url, -- cgit v1.2.3