aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/audio-only.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/videos/audio-only.ts')
-rw-r--r--server/tests/api/videos/audio-only.ts20
1 files changed, 4 insertions, 16 deletions
diff --git a/server/tests/api/videos/audio-only.ts b/server/tests/api/videos/audio-only.ts
index 9b516af81..e31905b36 100644
--- a/server/tests/api/videos/audio-only.ts
+++ b/server/tests/api/videos/audio-only.ts
@@ -4,17 +4,7 @@ import 'mocha'
4import * as chai from 'chai' 4import * as chai from 'chai'
5import { join } from 'path' 5import { join } from 'path'
6import { getAudioStream, getVideoStreamSize } from '@server/helpers/ffprobe-utils' 6import { getAudioStream, getVideoStreamSize } from '@server/helpers/ffprobe-utils'
7import { 7import { cleanupTests, doubleFollow, flushAndRunMultipleServers, ServerInfo, setAccessTokensToServers, waitJobs } from '@shared/extra-utils'
8 cleanupTests,
9 doubleFollow,
10 flushAndRunMultipleServers,
11 getVideo,
12 ServerInfo,
13 setAccessTokensToServers,
14 uploadVideo,
15 waitJobs
16} from '../../../../shared/extra-utils'
17import { VideoDetails } from '../../../../shared/models/videos'
18 8
19const expect = chai.expect 9const expect = chai.expect
20 10
@@ -58,15 +48,13 @@ describe('Test audio only video transcoding', function () {
58 it('Should upload a video and transcode it', async function () { 48 it('Should upload a video and transcode it', async function () {
59 this.timeout(120000) 49 this.timeout(120000)
60 50
61 const resUpload = await uploadVideo(servers[0].url, servers[0].accessToken, { name: 'audio only' }) 51 const { uuid } = await servers[0].videosCommand.upload({ attributes: { name: 'audio only' } })
62 videoUUID = resUpload.body.video.uuid 52 videoUUID = uuid
63 53
64 await waitJobs(servers) 54 await waitJobs(servers)
65 55
66 for (const server of servers) { 56 for (const server of servers) {
67 const res = await getVideo(server.url, videoUUID) 57 const video = await server.videosCommand.get({ id: videoUUID })
68 const video: VideoDetails = res.body
69
70 expect(video.streamingPlaylists).to.have.lengthOf(1) 58 expect(video.streamingPlaylists).to.have.lengthOf(1)
71 59
72 for (const files of [ video.files, video.streamingPlaylists[0].files ]) { 60 for (const files of [ video.files, video.streamingPlaylists[0].files ]) {