aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/video-hls.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-16 09:47:51 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit254d3579f5338f5fd775c17d15cdfc37078bcfb4 (patch)
treeeaeb13fda16c16e98cd6991d202b0ca6a4cbdb63 /server/tests/api/videos/video-hls.ts
parent89d241a79c262b9775c233b73cff080043ebb5e6 (diff)
downloadPeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.gz
PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.zst
PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.zip
Use an object to represent a server
Diffstat (limited to 'server/tests/api/videos/video-hls.ts')
-rw-r--r--server/tests/api/videos/video-hls.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/tests/api/videos/video-hls.ts b/server/tests/api/videos/video-hls.ts
index 9d79f2683..4c4b18887 100644
--- a/server/tests/api/videos/video-hls.ts
+++ b/server/tests/api/videos/video-hls.ts
@@ -11,9 +11,9 @@ import {
11 checkTmpIsEmpty, 11 checkTmpIsEmpty,
12 cleanupTests, 12 cleanupTests,
13 doubleFollow, 13 doubleFollow,
14 flushAndRunMultipleServers, 14 createMultipleServers,
15 makeRawRequest, 15 makeRawRequest,
16 ServerInfo, 16 PeerTubeServer,
17 setAccessTokensToServers, 17 setAccessTokensToServers,
18 waitJobs, 18 waitJobs,
19 webtorrentAdd 19 webtorrentAdd
@@ -23,7 +23,7 @@ import { DEFAULT_AUDIO_RESOLUTION } from '../../../initializers/constants'
23 23
24const expect = chai.expect 24const expect = chai.expect
25 25
26async function checkHlsPlaylist (servers: ServerInfo[], videoUUID: string, hlsOnly: boolean, resolutions = [ 240, 360, 480, 720 ]) { 26async function checkHlsPlaylist (servers: PeerTubeServer[], videoUUID: string, hlsOnly: boolean, resolutions = [ 240, 360, 480, 720 ]) {
27 for (const server of servers) { 27 for (const server of servers) {
28 const videoDetails = await server.videos.get({ id: videoUUID }) 28 const videoDetails = await server.videos.get({ id: videoUUID })
29 const baseUrl = `http://${videoDetails.account.host}` 29 const baseUrl = `http://${videoDetails.account.host}`
@@ -98,7 +98,7 @@ async function checkHlsPlaylist (servers: ServerInfo[], videoUUID: string, hlsOn
98} 98}
99 99
100describe('Test HLS videos', function () { 100describe('Test HLS videos', function () {
101 let servers: ServerInfo[] = [] 101 let servers: PeerTubeServer[] = []
102 let videoUUID = '' 102 let videoUUID = ''
103 let videoAudioUUID = '' 103 let videoAudioUUID = ''
104 104
@@ -176,7 +176,7 @@ describe('Test HLS videos', function () {
176 } 176 }
177 } 177 }
178 } 178 }
179 servers = await flushAndRunMultipleServers(2, configOverride) 179 servers = await createMultipleServers(2, configOverride)
180 180
181 // Get the access tokens 181 // Get the access tokens
182 await setAccessTokensToServers(servers) 182 await setAccessTokensToServers(servers)