From a056ca4813c82f490dcd31ac97a64d6bf76d3dcc Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 28 Oct 2020 15:24:40 +0100 Subject: Add max lives limit --- server/tests/api/check-params/config.ts | 2 ++ server/tests/api/server/config.ts | 6 ++++++ 2 files changed, 8 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 2882ceb7c..42ac5e1f9 100644 --- a/server/tests/api/check-params/config.ts +++ b/server/tests/api/check-params/config.ts @@ -105,6 +105,8 @@ describe('Test config API validators', function () { allowReplay: false, maxDuration: null, + maxInstanceLives: -1, + maxUserLives: 50, transcoding: { enabled: true, diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts index a7f035362..6c37be113 100644 --- a/server/tests/api/server/config.ts +++ b/server/tests/api/server/config.ts @@ -81,6 +81,8 @@ function checkInitialConfig (server: ServerInfo, data: CustomConfig) { 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.maxInstanceLives).to.equal(20) + expect(data.live.maxUserLives).to.equal(3) 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 @@ -166,6 +168,8 @@ function checkUpdatedConfig (data: CustomConfig) { expect(data.live.enabled).to.be.true expect(data.live.allowReplay).to.be.false expect(data.live.maxDuration).to.equal(5000) + expect(data.live.maxInstanceLives).to.equal(-1) + expect(data.live.maxUserLives).to.equal(10) 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 @@ -330,6 +334,8 @@ describe('Test config', function () { enabled: true, allowReplay: false, maxDuration: 5000, + maxInstanceLives: -1, + maxUserLives: 10, transcoding: { enabled: true, threads: 4, -- cgit v1.2.3