aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-12-11 14:52:50 +0100
committerChocobozzz <me@florianbigard.com>2018-12-11 15:11:09 +0100
commit14e2014acc1362cfbb770c051a7254b156cd8efb (patch)
tree8b7d5aedd9fe0beff8b971c9bae7781ba2069228 /server/tests/api/videos
parent8923187455c5aa7167d813c5c745d3857f183fd7 (diff)
downloadPeerTube-14e2014acc1362cfbb770c051a7254b156cd8efb.tar.gz
PeerTube-14e2014acc1362cfbb770c051a7254b156cd8efb.tar.zst
PeerTube-14e2014acc1362cfbb770c051a7254b156cd8efb.zip
Support additional video extensions
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r--server/tests/api/videos/video-transcoder.ts31
1 files changed, 29 insertions, 2 deletions
diff --git a/server/tests/api/videos/video-transcoder.ts b/server/tests/api/videos/video-transcoder.ts
index 68cf00194..eefd32ef8 100644
--- a/server/tests/api/videos/video-transcoder.ts
+++ b/server/tests/api/videos/video-transcoder.ts
@@ -20,9 +20,8 @@ import {
20 uploadVideo, 20 uploadVideo,
21 webtorrentAdd 21 webtorrentAdd
22} from '../../../../shared/utils' 22} from '../../../../shared/utils'
23import { join } from 'path' 23import { extname, join } from 'path'
24import { waitJobs } from '../../../../shared/utils/server/jobs' 24import { waitJobs } from '../../../../shared/utils/server/jobs'
25import { pathExists } from 'fs-extra'
26import { VIDEO_TRANSCODING_FPS } from '../../../../server/initializers/constants' 25import { VIDEO_TRANSCODING_FPS } from '../../../../server/initializers/constants'
27 26
28const expect = chai.expect 27const expect = chai.expect
@@ -322,6 +321,34 @@ describe('Test video transcoding', function () {
322 } 321 }
323 }) 322 })
324 323
324 it('Should accept and transcode additional extensions', async function () {
325 this.timeout(300000)
326
327 for (const fixture of [ 'video_short.mkv', 'video_short.avi' ]) {
328 const videoAttributes = {
329 name: fixture,
330 fixture
331 }
332
333 await uploadVideo(servers[ 1 ].url, servers[ 1 ].accessToken, videoAttributes)
334
335 await waitJobs(servers)
336
337 for (const server of servers) {
338 const res = await getVideosList(server.url)
339
340 const video = res.body.data.find(v => v.name === videoAttributes.name)
341 const res2 = await getVideo(server.url, video.id)
342 const videoDetails = res2.body
343
344 expect(videoDetails.files).to.have.lengthOf(4)
345
346 const magnetUri = videoDetails.files[ 0 ].magnetUri
347 expect(magnetUri).to.contain('.mp4')
348 }
349 }
350 })
351
325 after(async function () { 352 after(async function () {
326 killallServers(servers) 353 killallServers(servers)
327 }) 354 })