From fb7194043d0486ce0a6a40b2ffbdf32878c33a6f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 25 Sep 2020 16:19:35 +0200 Subject: Check live duration and size --- server/tests/api/check-params/config.ts | 3 +++ server/tests/api/server/config.ts | 6 ++++++ 2 files changed, 9 insertions(+) (limited to 'server/tests/api') diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts index 35cb333ef..2882ceb7c 100644 --- a/server/tests/api/check-params/config.ts +++ b/server/tests/api/check-params/config.ts @@ -103,6 +103,9 @@ describe('Test config API validators', function () { live: { enabled: true, + allowReplay: false, + maxDuration: null, + transcoding: { enabled: true, threads: 4, diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts index a46e179c2..a7f035362 100644 --- a/server/tests/api/server/config.ts +++ b/server/tests/api/server/config.ts @@ -79,6 +79,8 @@ function checkInitialConfig (server: ServerInfo, data: CustomConfig) { expect(data.transcoding.hls.enabled).to.be.true expect(data.live.enabled).to.be.false + expect(data.live.allowReplay).to.be.true + expect(data.live.maxDuration).to.equal(1000 * 3600 * 5) expect(data.live.transcoding.enabled).to.be.false expect(data.live.transcoding.threads).to.equal(2) expect(data.live.transcoding.resolutions['240p']).to.be.false @@ -162,6 +164,8 @@ function checkUpdatedConfig (data: CustomConfig) { expect(data.transcoding.webtorrent.enabled).to.be.true expect(data.live.enabled).to.be.true + expect(data.live.allowReplay).to.be.false + expect(data.live.maxDuration).to.equal(5000) expect(data.live.transcoding.enabled).to.be.true expect(data.live.transcoding.threads).to.equal(4) expect(data.live.transcoding.resolutions['240p']).to.be.true @@ -324,6 +328,8 @@ describe('Test config', function () { }, live: { enabled: true, + allowReplay: false, + maxDuration: 5000, transcoding: { enabled: true, threads: 4, -- cgit v1.2.3