diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-15 10:02:54 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | d23dd9fbfc4d26026352c10f81d2795ceaf2908a (patch) | |
tree | da82286d423c5e834a1ee2dcd5970076b8263cf1 /server/tests/api/videos/audio-only.ts | |
parent | 7926c5f9b3ffcabb1ffb0dcfa5e48b8e0b88fbc0 (diff) | |
download | PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.tar.gz PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.tar.zst PeerTube-d23dd9fbfc4d26026352c10f81d2795ceaf2908a.zip |
Introduce videos command
Diffstat (limited to 'server/tests/api/videos/audio-only.ts')
-rw-r--r-- | server/tests/api/videos/audio-only.ts | 20 |
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' | |||
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { join } from 'path' | 5 | import { join } from 'path' |
6 | import { getAudioStream, getVideoStreamSize } from '@server/helpers/ffprobe-utils' | 6 | import { getAudioStream, getVideoStreamSize } from '@server/helpers/ffprobe-utils' |
7 | import { | 7 | import { 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' | ||
17 | import { VideoDetails } from '../../../../shared/models/videos' | ||
18 | 8 | ||
19 | const expect = chai.expect | 9 | const 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 ]) { |