aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/peertube-runner/vod-transcoding.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/peertube-runner/vod-transcoding.ts')
-rw-r--r--server/tests/peertube-runner/vod-transcoding.ts46
1 files changed, 23 insertions, 23 deletions
diff --git a/server/tests/peertube-runner/vod-transcoding.ts b/server/tests/peertube-runner/vod-transcoding.ts
index c3f41c097..eef6faf4e 100644
--- a/server/tests/peertube-runner/vod-transcoding.ts
+++ b/server/tests/peertube-runner/vod-transcoding.ts
@@ -24,13 +24,13 @@ describe('Test VOD transcoding in peertube-runner program', function () {
24 let peertubeRunner: PeerTubeRunnerProcess 24 let peertubeRunner: PeerTubeRunnerProcess
25 25
26 function runSuite (options: { 26 function runSuite (options: {
27 webtorrentEnabled: boolean 27 webVideoEnabled: boolean
28 hlsEnabled: boolean 28 hlsEnabled: boolean
29 objectStorage?: ObjectStorageCommand 29 objectStorage?: ObjectStorageCommand
30 }) { 30 }) {
31 const { webtorrentEnabled, hlsEnabled, objectStorage } = options 31 const { webVideoEnabled, hlsEnabled, objectStorage } = options
32 32
33 const objectStorageBaseUrlWebTorrent = objectStorage 33 const objectStorageBaseUrlWebVideo = objectStorage
34 ? objectStorage.getMockWebVideosBaseUrl() 34 ? objectStorage.getMockWebVideosBaseUrl()
35 : undefined 35 : undefined
36 36
@@ -46,13 +46,13 @@ describe('Test VOD transcoding in peertube-runner program', function () {
46 await waitJobs(servers, { runnerJobs: true }) 46 await waitJobs(servers, { runnerJobs: true })
47 47
48 for (const server of servers) { 48 for (const server of servers) {
49 if (webtorrentEnabled) { 49 if (webVideoEnabled) {
50 await completeWebVideoFilesCheck({ 50 await completeWebVideoFilesCheck({
51 server, 51 server,
52 originServer: servers[0], 52 originServer: servers[0],
53 fixture: 'video_short.mp4', 53 fixture: 'video_short.mp4',
54 videoUUID: uuid, 54 videoUUID: uuid,
55 objectStorageBaseUrl: objectStorageBaseUrlWebTorrent, 55 objectStorageBaseUrl: objectStorageBaseUrlWebVideo,
56 files: [ 56 files: [
57 { resolution: 0 }, 57 { resolution: 0 },
58 { resolution: 144 }, 58 { resolution: 144 },
@@ -66,7 +66,7 @@ describe('Test VOD transcoding in peertube-runner program', function () {
66 66
67 if (hlsEnabled) { 67 if (hlsEnabled) {
68 await completeCheckHlsPlaylist({ 68 await completeCheckHlsPlaylist({
69 hlsOnly: !webtorrentEnabled, 69 hlsOnly: !webVideoEnabled,
70 servers, 70 servers,
71 videoUUID: uuid, 71 videoUUID: uuid,
72 objectStorageBaseUrl: objectStorageBaseUrlHLS, 72 objectStorageBaseUrl: objectStorageBaseUrlHLS,
@@ -84,13 +84,13 @@ describe('Test VOD transcoding in peertube-runner program', function () {
84 await waitJobs(servers, { runnerJobs: true }) 84 await waitJobs(servers, { runnerJobs: true })
85 85
86 for (const server of servers) { 86 for (const server of servers) {
87 if (webtorrentEnabled) { 87 if (webVideoEnabled) {
88 await completeWebVideoFilesCheck({ 88 await completeWebVideoFilesCheck({
89 server, 89 server,
90 originServer: servers[0], 90 originServer: servers[0],
91 fixture: 'video_short.webm', 91 fixture: 'video_short.webm',
92 videoUUID: uuid, 92 videoUUID: uuid,
93 objectStorageBaseUrl: objectStorageBaseUrlWebTorrent, 93 objectStorageBaseUrl: objectStorageBaseUrlWebVideo,
94 files: [ 94 files: [
95 { resolution: 0 }, 95 { resolution: 0 },
96 { resolution: 144 }, 96 { resolution: 144 },
@@ -104,7 +104,7 @@ describe('Test VOD transcoding in peertube-runner program', function () {
104 104
105 if (hlsEnabled) { 105 if (hlsEnabled) {
106 await completeCheckHlsPlaylist({ 106 await completeCheckHlsPlaylist({
107 hlsOnly: !webtorrentEnabled, 107 hlsOnly: !webVideoEnabled,
108 servers, 108 servers,
109 videoUUID: uuid, 109 videoUUID: uuid,
110 objectStorageBaseUrl: objectStorageBaseUrlHLS, 110 objectStorageBaseUrl: objectStorageBaseUrlHLS,
@@ -123,13 +123,13 @@ describe('Test VOD transcoding in peertube-runner program', function () {
123 await waitJobs(servers, { runnerJobs: true }) 123 await waitJobs(servers, { runnerJobs: true })
124 124
125 for (const server of servers) { 125 for (const server of servers) {
126 if (webtorrentEnabled) { 126 if (webVideoEnabled) {
127 await completeWebVideoFilesCheck({ 127 await completeWebVideoFilesCheck({
128 server, 128 server,
129 originServer: servers[0], 129 originServer: servers[0],
130 fixture: 'sample.ogg', 130 fixture: 'sample.ogg',
131 videoUUID: uuid, 131 videoUUID: uuid,
132 objectStorageBaseUrl: objectStorageBaseUrlWebTorrent, 132 objectStorageBaseUrl: objectStorageBaseUrlWebVideo,
133 files: [ 133 files: [
134 { resolution: 0 }, 134 { resolution: 0 },
135 { resolution: 144 }, 135 { resolution: 144 },
@@ -142,7 +142,7 @@ describe('Test VOD transcoding in peertube-runner program', function () {
142 142
143 if (hlsEnabled) { 143 if (hlsEnabled) {
144 await completeCheckHlsPlaylist({ 144 await completeCheckHlsPlaylist({
145 hlsOnly: !webtorrentEnabled, 145 hlsOnly: !webVideoEnabled,
146 servers, 146 servers,
147 videoUUID: uuid, 147 videoUUID: uuid,
148 objectStorageBaseUrl: objectStorageBaseUrlHLS, 148 objectStorageBaseUrl: objectStorageBaseUrlHLS,
@@ -159,13 +159,13 @@ describe('Test VOD transcoding in peertube-runner program', function () {
159 159
160 await waitJobs(servers, { runnerJobs: true }) 160 await waitJobs(servers, { runnerJobs: true })
161 161
162 if (webtorrentEnabled) { 162 if (webVideoEnabled) {
163 await completeWebVideoFilesCheck({ 163 await completeWebVideoFilesCheck({
164 server: servers[0], 164 server: servers[0],
165 originServer: servers[0], 165 originServer: servers[0],
166 fixture: 'video_short.mp4', 166 fixture: 'video_short.mp4',
167 videoUUID: uuid, 167 videoUUID: uuid,
168 objectStorageBaseUrl: objectStorageBaseUrlWebTorrent, 168 objectStorageBaseUrl: objectStorageBaseUrlWebVideo,
169 files: [ 169 files: [
170 { resolution: 0 }, 170 { resolution: 0 },
171 { resolution: 144 }, 171 { resolution: 144 },
@@ -179,7 +179,7 @@ describe('Test VOD transcoding in peertube-runner program', function () {
179 179
180 if (hlsEnabled) { 180 if (hlsEnabled) {
181 await completeCheckHlsPlaylist({ 181 await completeCheckHlsPlaylist({
182 hlsOnly: !webtorrentEnabled, 182 hlsOnly: !webVideoEnabled,
183 servers: [ servers[0] ], 183 servers: [ servers[0] ],
184 videoUUID: uuid, 184 videoUUID: uuid,
185 objectStorageBaseUrl: objectStorageBaseUrlHLS, 185 objectStorageBaseUrl: objectStorageBaseUrlHLS,
@@ -203,7 +203,7 @@ describe('Test VOD transcoding in peertube-runner program', function () {
203 203
204 await servers[0].config.enableTranscoding(true, true, true) 204 await servers[0].config.enableTranscoding(true, true, true)
205 205
206 await servers[0].videos.runTranscoding({ transcodingType: 'webtorrent', videoId: uuid }) 206 await servers[0].videos.runTranscoding({ transcodingType: 'web-video', videoId: uuid })
207 await waitJobs(servers, { runnerJobs: true }) 207 await waitJobs(servers, { runnerJobs: true })
208 208
209 await completeWebVideoFilesCheck({ 209 await completeWebVideoFilesCheck({
@@ -211,7 +211,7 @@ describe('Test VOD transcoding in peertube-runner program', function () {
211 originServer: servers[0], 211 originServer: servers[0],
212 fixture: 'video_short.mp4', 212 fixture: 'video_short.mp4',
213 videoUUID: uuid, 213 videoUUID: uuid,
214 objectStorageBaseUrl: objectStorageBaseUrlWebTorrent, 214 objectStorageBaseUrl: objectStorageBaseUrlWebVideo,
215 files: [ 215 files: [
216 { resolution: 0 }, 216 { resolution: 0 },
217 { resolution: 144 }, 217 { resolution: 144 },
@@ -262,7 +262,7 @@ describe('Test VOD transcoding in peertube-runner program', function () {
262 await servers[0].config.enableTranscoding(true, false, true) 262 await servers[0].config.enableTranscoding(true, false, true)
263 }) 263 })
264 264
265 runSuite({ webtorrentEnabled: true, hlsEnabled: false }) 265 runSuite({ webVideoEnabled: true, hlsEnabled: false })
266 }) 266 })
267 267
268 describe('HLS videos only enabled', function () { 268 describe('HLS videos only enabled', function () {
@@ -271,7 +271,7 @@ describe('Test VOD transcoding in peertube-runner program', function () {
271 await servers[0].config.enableTranscoding(false, true, true) 271 await servers[0].config.enableTranscoding(false, true, true)
272 }) 272 })
273 273
274 runSuite({ webtorrentEnabled: false, hlsEnabled: true }) 274 runSuite({ webVideoEnabled: false, hlsEnabled: true })
275 }) 275 })
276 276
277 describe('Web video & HLS enabled', function () { 277 describe('Web video & HLS enabled', function () {
@@ -280,7 +280,7 @@ describe('Test VOD transcoding in peertube-runner program', function () {
280 await servers[0].config.enableTranscoding(true, true, true) 280 await servers[0].config.enableTranscoding(true, true, true)
281 }) 281 })
282 282
283 runSuite({ webtorrentEnabled: true, hlsEnabled: true }) 283 runSuite({ webVideoEnabled: true, hlsEnabled: true })
284 }) 284 })
285 }) 285 })
286 286
@@ -306,7 +306,7 @@ describe('Test VOD transcoding in peertube-runner program', function () {
306 await servers[0].config.enableTranscoding(true, false, true) 306 await servers[0].config.enableTranscoding(true, false, true)
307 }) 307 })
308 308
309 runSuite({ webtorrentEnabled: true, hlsEnabled: false, objectStorage }) 309 runSuite({ webVideoEnabled: true, hlsEnabled: false, objectStorage })
310 }) 310 })
311 311
312 describe('HLS videos only enabled', function () { 312 describe('HLS videos only enabled', function () {
@@ -315,7 +315,7 @@ describe('Test VOD transcoding in peertube-runner program', function () {
315 await servers[0].config.enableTranscoding(false, true, true) 315 await servers[0].config.enableTranscoding(false, true, true)
316 }) 316 })
317 317
318 runSuite({ webtorrentEnabled: false, hlsEnabled: true, objectStorage }) 318 runSuite({ webVideoEnabled: false, hlsEnabled: true, objectStorage })
319 }) 319 })
320 320
321 describe('Web video & HLS enabled', function () { 321 describe('Web video & HLS enabled', function () {
@@ -324,7 +324,7 @@ describe('Test VOD transcoding in peertube-runner program', function () {
324 await servers[0].config.enableTranscoding(true, true, true) 324 await servers[0].config.enableTranscoding(true, true, true)
325 }) 325 })
326 326
327 runSuite({ webtorrentEnabled: true, hlsEnabled: true, objectStorage }) 327 runSuite({ webVideoEnabled: true, hlsEnabled: true, objectStorage })
328 }) 328 })
329 329
330 after(async function () { 330 after(async function () {