aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/check-params/config.ts2
-rw-r--r--server/tests/api/server/config.ts6
-rw-r--r--server/tests/api/videos/video-transcoder.ts4
3 files changed, 11 insertions, 1 deletions
diff --git a/server/tests/api/check-params/config.ts b/server/tests/api/check-params/config.ts
index d3ae5fe0a..e6309b5f7 100644
--- a/server/tests/api/check-params/config.ts
+++ b/server/tests/api/check-params/config.ts
@@ -87,6 +87,7 @@ describe('Test config API validators', function () {
87 allowAdditionalExtensions: true, 87 allowAdditionalExtensions: true,
88 allowAudioFiles: true, 88 allowAudioFiles: true,
89 threads: 1, 89 threads: 1,
90 profile: 'vod_profile',
90 resolutions: { 91 resolutions: {
91 '0p': false, 92 '0p': false,
92 '240p': false, 93 '240p': false,
@@ -115,6 +116,7 @@ describe('Test config API validators', function () {
115 transcoding: { 116 transcoding: {
116 enabled: true, 117 enabled: true,
117 threads: 4, 118 threads: 4,
119 profile: 'live_profile',
118 resolutions: { 120 resolutions: {
119 '240p': true, 121 '240p': true,
120 '360p': true, 122 '360p': true,
diff --git a/server/tests/api/server/config.ts b/server/tests/api/server/config.ts
index e0575bdfd..e5bab0b77 100644
--- a/server/tests/api/server/config.ts
+++ b/server/tests/api/server/config.ts
@@ -70,6 +70,7 @@ function checkInitialConfig (server: ServerInfo, data: CustomConfig) {
70 expect(data.transcoding.allowAdditionalExtensions).to.be.false 70 expect(data.transcoding.allowAdditionalExtensions).to.be.false
71 expect(data.transcoding.allowAudioFiles).to.be.false 71 expect(data.transcoding.allowAudioFiles).to.be.false
72 expect(data.transcoding.threads).to.equal(2) 72 expect(data.transcoding.threads).to.equal(2)
73 expect(data.transcoding.profile).to.equal('default')
73 expect(data.transcoding.resolutions['240p']).to.be.true 74 expect(data.transcoding.resolutions['240p']).to.be.true
74 expect(data.transcoding.resolutions['360p']).to.be.true 75 expect(data.transcoding.resolutions['360p']).to.be.true
75 expect(data.transcoding.resolutions['480p']).to.be.true 76 expect(data.transcoding.resolutions['480p']).to.be.true
@@ -87,6 +88,7 @@ function checkInitialConfig (server: ServerInfo, data: CustomConfig) {
87 expect(data.live.maxUserLives).to.equal(3) 88 expect(data.live.maxUserLives).to.equal(3)
88 expect(data.live.transcoding.enabled).to.be.false 89 expect(data.live.transcoding.enabled).to.be.false
89 expect(data.live.transcoding.threads).to.equal(2) 90 expect(data.live.transcoding.threads).to.equal(2)
91 expect(data.live.transcoding.profile).to.equal('default')
90 expect(data.live.transcoding.resolutions['240p']).to.be.false 92 expect(data.live.transcoding.resolutions['240p']).to.be.false
91 expect(data.live.transcoding.resolutions['360p']).to.be.false 93 expect(data.live.transcoding.resolutions['360p']).to.be.false
92 expect(data.live.transcoding.resolutions['480p']).to.be.false 94 expect(data.live.transcoding.resolutions['480p']).to.be.false
@@ -159,6 +161,7 @@ function checkUpdatedConfig (data: CustomConfig) {
159 expect(data.transcoding.threads).to.equal(1) 161 expect(data.transcoding.threads).to.equal(1)
160 expect(data.transcoding.allowAdditionalExtensions).to.be.true 162 expect(data.transcoding.allowAdditionalExtensions).to.be.true
161 expect(data.transcoding.allowAudioFiles).to.be.true 163 expect(data.transcoding.allowAudioFiles).to.be.true
164 expect(data.transcoding.profile).to.equal('vod_profile')
162 expect(data.transcoding.resolutions['240p']).to.be.false 165 expect(data.transcoding.resolutions['240p']).to.be.false
163 expect(data.transcoding.resolutions['360p']).to.be.true 166 expect(data.transcoding.resolutions['360p']).to.be.true
164 expect(data.transcoding.resolutions['480p']).to.be.true 167 expect(data.transcoding.resolutions['480p']).to.be.true
@@ -175,6 +178,7 @@ function checkUpdatedConfig (data: CustomConfig) {
175 expect(data.live.maxUserLives).to.equal(10) 178 expect(data.live.maxUserLives).to.equal(10)
176 expect(data.live.transcoding.enabled).to.be.true 179 expect(data.live.transcoding.enabled).to.be.true
177 expect(data.live.transcoding.threads).to.equal(4) 180 expect(data.live.transcoding.threads).to.equal(4)
181 expect(data.live.transcoding.profile).to.equal('live_profile')
178 expect(data.live.transcoding.resolutions['240p']).to.be.true 182 expect(data.live.transcoding.resolutions['240p']).to.be.true
179 expect(data.live.transcoding.resolutions['360p']).to.be.true 183 expect(data.live.transcoding.resolutions['360p']).to.be.true
180 expect(data.live.transcoding.resolutions['480p']).to.be.true 184 expect(data.live.transcoding.resolutions['480p']).to.be.true
@@ -319,6 +323,7 @@ describe('Test config', function () {
319 allowAdditionalExtensions: true, 323 allowAdditionalExtensions: true,
320 allowAudioFiles: true, 324 allowAudioFiles: true,
321 threads: 1, 325 threads: 1,
326 profile: 'vod_profile',
322 resolutions: { 327 resolutions: {
323 '0p': false, 328 '0p': false,
324 '240p': false, 329 '240p': false,
@@ -345,6 +350,7 @@ describe('Test config', function () {
345 transcoding: { 350 transcoding: {
346 enabled: true, 351 enabled: true,
347 threads: 4, 352 threads: 4,
353 profile: 'live_profile',
348 resolutions: { 354 resolutions: {
349 '240p': true, 355 '240p': true,
350 '360p': true, 356 '360p': true,
diff --git a/server/tests/api/videos/video-transcoder.ts b/server/tests/api/videos/video-transcoder.ts
index 631230f26..5ad02df2f 100644
--- a/server/tests/api/videos/video-transcoder.ts
+++ b/server/tests/api/videos/video-transcoder.ts
@@ -511,7 +511,9 @@ describe('Test video transcoding', function () {
511 511
512 const resolutions = [ 240, 360, 480, 720, 1080 ] 512 const resolutions = [ 240, 360, 480, 720, 1080 ]
513 for (const r of resolutions) { 513 for (const r of resolutions) {
514 expect(await getServerFileSize(servers[1], `videos/${videoUUID}-${r}.mp4`)).to.be.below(60_000) 514 const path = `videos/${videoUUID}-${r}.mp4`
515 const size = await getServerFileSize(servers[1], path)
516 expect(size, `${path} not below ${60_000}`).to.be.below(60_000)
515 } 517 }
516 }) 518 })
517 519