aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-07-28 16:06:49 +0200
committerChocobozzz <me@florianbigard.com>2023-07-28 16:06:49 +0200
commit74c8d5bf2d807870ed351fb2a0ee7137987aa995 (patch)
treedc4493ac1afe6b9033753741997318befa828940 /server/tests/api/videos
parente390107e5acffda6b6fa994be1f2874183bab40c (diff)
downloadPeerTube-74c8d5bf2d807870ed351fb2a0ee7137987aa995.tar.gz
PeerTube-74c8d5bf2d807870ed351fb2a0ee7137987aa995.tar.zst
PeerTube-74c8d5bf2d807870ed351fb2a0ee7137987aa995.zip
Refactor enableTranscoding command helpers
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r--server/tests/api/videos/video-files.ts2
-rw-r--r--server/tests/api/videos/video-source.ts4
-rw-r--r--server/tests/api/videos/videos-common-filters.ts6
3 files changed, 6 insertions, 6 deletions
diff --git a/server/tests/api/videos/video-files.ts b/server/tests/api/videos/video-files.ts
index 0a183c44d..4f75cd106 100644
--- a/server/tests/api/videos/video-files.ts
+++ b/server/tests/api/videos/video-files.ts
@@ -25,7 +25,7 @@ describe('Test videos files', function () {
25 25
26 await doubleFollow(servers[0], servers[1]) 26 await doubleFollow(servers[0], servers[1])
27 27
28 await servers[0].config.enableTranscoding(true, true) 28 await servers[0].config.enableTranscoding({ hls: true, webVideo: true })
29 }) 29 })
30 30
31 describe('When deleting all files', function () { 31 describe('When deleting all files', function () {
diff --git a/server/tests/api/videos/video-source.ts b/server/tests/api/videos/video-source.ts
index 8669f342e..1f394f904 100644
--- a/server/tests/api/videos/video-source.ts
+++ b/server/tests/api/videos/video-source.ts
@@ -114,7 +114,7 @@ describe('Test a video file replacement', function () {
114 114
115 const previousPaths: string[] = [] 115 const previousPaths: string[] = []
116 116
117 await servers[0].config.enableTranscoding(true, true, true) 117 await servers[0].config.enableTranscoding({ hls: true, webVideo: true, with0p: true })
118 118
119 const { uuid: videoUUID } = await servers[0].videos.quickUpload({ name: 'fs with transcoding', fixture: 'video_short_720p.mp4' }) 119 const { uuid: videoUUID } = await servers[0].videos.quickUpload({ name: 'fs with transcoding', fixture: 'video_short_720p.mp4' })
120 uuid = videoUUID 120 uuid = videoUUID
@@ -387,7 +387,7 @@ describe('Test a video file replacement', function () {
387 387
388 const previousPaths: string[] = [] 388 const previousPaths: string[] = []
389 389
390 await servers[0].config.enableTranscoding(true, true, true) 390 await servers[0].config.enableTranscoding({ hls: true, webVideo: true, with0p: true })
391 391
392 const { uuid: videoUUID } = await servers[0].videos.quickUpload({ 392 const { uuid: videoUUID } = await servers[0].videos.quickUpload({
393 name: 'object storage with transcoding', 393 name: 'object storage with transcoding',
diff --git a/server/tests/api/videos/videos-common-filters.ts b/server/tests/api/videos/videos-common-filters.ts
index ba861164b..f68560b06 100644
--- a/server/tests/api/videos/videos-common-filters.ts
+++ b/server/tests/api/videos/videos-common-filters.ts
@@ -468,19 +468,19 @@ describe('Test videos filter', function () {
468 468
469 const finderFactory = (name: string) => (videos: Video[]) => videos.some(v => v.name === name) 469 const finderFactory = (name: string) => (videos: Video[]) => videos.some(v => v.name === name)
470 470
471 await servers[0].config.enableTranscoding(true, false) 471 await servers[0].config.enableTranscoding({ hls: false, webVideo: true })
472 await servers[0].videos.upload({ attributes: { name: 'web video' } }) 472 await servers[0].videos.upload({ attributes: { name: 'web video' } })
473 const hasWebVideo = finderFactory('web video') 473 const hasWebVideo = finderFactory('web video')
474 474
475 await waitJobs(servers) 475 await waitJobs(servers)
476 476
477 await servers[0].config.enableTranscoding(false, true) 477 await servers[0].config.enableTranscoding({ hls: true, webVideo: false })
478 await servers[0].videos.upload({ attributes: { name: 'hls video' } }) 478 await servers[0].videos.upload({ attributes: { name: 'hls video' } })
479 const hasHLS = finderFactory('hls video') 479 const hasHLS = finderFactory('hls video')
480 480
481 await waitJobs(servers) 481 await waitJobs(servers)
482 482
483 await servers[0].config.enableTranscoding(true, true) 483 await servers[0].config.enableTranscoding({ hls: true, webVideo: true })
484 await servers[0].videos.upload({ attributes: { name: 'hls and web video' } }) 484 await servers[0].videos.upload({ attributes: { name: 'hls and web video' } })
485 const hasBoth = finderFactory('hls and web video') 485 const hasBoth = finderFactory('hls and web video')
486 486