diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-07 11:51:09 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:17 +0200 |
commit | 65e6e2602c0d5521f3a6740f7469bb92830ecb53 (patch) | |
tree | f89024ffff1dafb0281ee2fe028e89b95101bd44 /server/tests/api/videos/video-hls.ts | |
parent | bc8090411ddaa8d742ce4de3c83f9dba7bc18e2a (diff) | |
download | PeerTube-65e6e2602c0d5521f3a6740f7469bb92830ecb53.tar.gz PeerTube-65e6e2602c0d5521f3a6740f7469bb92830ecb53.tar.zst PeerTube-65e6e2602c0d5521f3a6740f7469bb92830ecb53.zip |
Introduce config command
Diffstat (limited to 'server/tests/api/videos/video-hls.ts')
-rw-r--r-- | server/tests/api/videos/video-hls.ts | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/server/tests/api/videos/video-hls.ts b/server/tests/api/videos/video-hls.ts index 03ac3f321..3821cfed0 100644 --- a/server/tests/api/videos/video-hls.ts +++ b/server/tests/api/videos/video-hls.ts | |||
@@ -3,6 +3,7 @@ | |||
3 | import 'mocha' | 3 | 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 { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
6 | import { | 7 | import { |
7 | checkDirectoryIsEmpty, | 8 | checkDirectoryIsEmpty, |
8 | checkResolutionsInMasterPlaylist, | 9 | checkResolutionsInMasterPlaylist, |
@@ -17,7 +18,6 @@ import { | |||
17 | removeVideo, | 18 | removeVideo, |
18 | ServerInfo, | 19 | ServerInfo, |
19 | setAccessTokensToServers, | 20 | setAccessTokensToServers, |
20 | updateCustomSubConfig, | ||
21 | updateVideo, | 21 | updateVideo, |
22 | uploadVideo, | 22 | uploadVideo, |
23 | waitJobs, | 23 | waitJobs, |
@@ -26,7 +26,6 @@ import { | |||
26 | import { VideoDetails } from '../../../../shared/models/videos' | 26 | import { VideoDetails } from '../../../../shared/models/videos' |
27 | import { VideoStreamingPlaylistType } from '../../../../shared/models/videos/video-streaming-playlist.type' | 27 | import { VideoStreamingPlaylistType } from '../../../../shared/models/videos/video-streaming-playlist.type' |
28 | import { DEFAULT_AUDIO_RESOLUTION } from '../../../initializers/constants' | 28 | import { DEFAULT_AUDIO_RESOLUTION } from '../../../initializers/constants' |
29 | import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes' | ||
30 | 29 | ||
31 | const expect = chai.expect | 30 | const expect = chai.expect |
32 | 31 | ||
@@ -192,24 +191,26 @@ describe('Test HLS videos', function () { | |||
192 | describe('With only HLS enabled', function () { | 191 | describe('With only HLS enabled', function () { |
193 | 192 | ||
194 | before(async function () { | 193 | before(async function () { |
195 | await updateCustomSubConfig(servers[0].url, servers[0].accessToken, { | 194 | await servers[0].configCommand.updateCustomSubConfig({ |
196 | transcoding: { | 195 | newConfig: { |
197 | enabled: true, | 196 | transcoding: { |
198 | allowAudioFiles: true, | 197 | enabled: true, |
199 | resolutions: { | 198 | allowAudioFiles: true, |
200 | '240p': true, | 199 | resolutions: { |
201 | '360p': true, | 200 | '240p': true, |
202 | '480p': true, | 201 | '360p': true, |
203 | '720p': true, | 202 | '480p': true, |
204 | '1080p': true, | 203 | '720p': true, |
205 | '1440p': true, | 204 | '1080p': true, |
206 | '2160p': true | 205 | '1440p': true, |
207 | }, | 206 | '2160p': true |
208 | hls: { | 207 | }, |
209 | enabled: true | 208 | hls: { |
210 | }, | 209 | enabled: true |
211 | webtorrent: { | 210 | }, |
212 | enabled: false | 211 | webtorrent: { |
212 | enabled: false | ||
213 | } | ||
213 | } | 214 | } |
214 | } | 215 | } |
215 | }) | 216 | }) |