]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/server/config.ts
Fix various typos
[github/Chocobozzz/PeerTube.git] / server / tests / api / server / config.ts
index 2e6617a15427d31a3c00c020a9437251e8100a19..0f2fb5493cf84ae70e2c249557fdfe76a4b4bdaa 100644 (file)
@@ -2,16 +2,16 @@
 
 import 'mocha'
 import * as chai from 'chai'
+import { parallelTests } from '@shared/core-utils'
+import { CustomConfig, HttpStatusCode } from '@shared/models'
 import {
   cleanupTests,
   createSingleServer,
   killallServers,
   makeGetRequest,
-  parallelTests,
   PeerTubeServer,
   setAccessTokensToServers
 } from '@shared/server-commands'
-import { CustomConfig, HttpStatusCode } from '@shared/models'
 
 const expect = chai.expect
 
@@ -82,6 +82,7 @@ function checkInitialConfig (server: PeerTubeServer, data: CustomConfig) {
 
   expect(data.live.enabled).to.be.false
   expect(data.live.allowReplay).to.be.false
+  expect(data.live.latencySetting.enabled).to.be.true
   expect(data.live.maxDuration).to.equal(-1)
   expect(data.live.maxInstanceLives).to.equal(20)
   expect(data.live.maxUserLives).to.equal(3)
@@ -97,6 +98,8 @@ function checkInitialConfig (server: PeerTubeServer, data: CustomConfig) {
   expect(data.live.transcoding.resolutions['1440p']).to.be.false
   expect(data.live.transcoding.resolutions['2160p']).to.be.false
 
+  expect(data.videoStudio.enabled).to.be.false
+
   expect(data.import.videos.concurrency).to.equal(2)
   expect(data.import.videos.http.enabled).to.be.true
   expect(data.import.videos.torrent.enabled).to.be.true
@@ -183,6 +186,7 @@ function checkUpdatedConfig (data: CustomConfig) {
 
   expect(data.live.enabled).to.be.true
   expect(data.live.allowReplay).to.be.true
+  expect(data.live.latencySetting.enabled).to.be.false
   expect(data.live.maxDuration).to.equal(5000)
   expect(data.live.maxInstanceLives).to.equal(-1)
   expect(data.live.maxUserLives).to.equal(10)
@@ -197,6 +201,8 @@ function checkUpdatedConfig (data: CustomConfig) {
   expect(data.live.transcoding.resolutions['1080p']).to.be.true
   expect(data.live.transcoding.resolutions['2160p']).to.be.true
 
+  expect(data.videoStudio.enabled).to.be.true
+
   expect(data.import.videos.concurrency).to.equal(4)
   expect(data.import.videos.http.enabled).to.be.false
   expect(data.import.videos.torrent.enabled).to.be.false
@@ -322,6 +328,9 @@ const newCustomConfig: CustomConfig = {
   live: {
     enabled: true,
     allowReplay: true,
+    latencySetting: {
+      enabled: false
+    },
     maxDuration: 5000,
     maxInstanceLives: -1,
     maxUserLives: 10,
@@ -341,6 +350,9 @@ const newCustomConfig: CustomConfig = {
       }
     }
   },
+  videoStudio: {
+    enabled: true
+  },
   import: {
     videos: {
       concurrency: 4,
@@ -355,7 +367,7 @@ const newCustomConfig: CustomConfig = {
   trending: {
     videos: {
       algorithms: {
-        enabled: [ 'best', 'hot', 'most-viewed', 'most-liked' ],
+        enabled: [ 'hot', 'most-viewed', 'most-liked' ],
         default: 'hot'
       }
     }