aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/video-hls.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/videos/video-hls.ts')
-rw-r--r--server/tests/api/videos/video-hls.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/server/tests/api/videos/video-hls.ts b/server/tests/api/videos/video-hls.ts
index 22031c18b..4565d0ebe 100644
--- a/server/tests/api/videos/video-hls.ts
+++ b/server/tests/api/videos/video-hls.ts
@@ -5,13 +5,12 @@ import 'mocha'
5import { 5import {
6 checkDirectoryIsEmpty, 6 checkDirectoryIsEmpty,
7 checkSegmentHash, 7 checkSegmentHash,
8 checkTmpIsEmpty, cleanupTests, 8 checkTmpIsEmpty,
9 cleanupTests,
9 doubleFollow, 10 doubleFollow,
10 flushAndRunMultipleServers, 11 flushAndRunMultipleServers,
11 flushTests,
12 getPlaylist, 12 getPlaylist,
13 getVideo, 13 getVideo,
14 killallServers,
15 removeVideo, 14 removeVideo,
16 ServerInfo, 15 ServerInfo,
17 setAccessTokensToServers, 16 setAccessTokensToServers,
@@ -51,7 +50,7 @@ async function checkHlsPlaylist (servers: ServerInfo[], videoUUID: string) {
51 50
52 { 51 {
53 for (const resolution of resolutions) { 52 for (const resolution of resolutions) {
54 const res2 = await getPlaylist(`http://localhost:9001/static/streaming-playlists/hls/${videoUUID}/${resolution}.m3u8`) 53 const res2 = await getPlaylist(`http://localhost:${server.port}/static/streaming-playlists/hls/${videoUUID}/${resolution}.m3u8`)
55 54
56 const subPlaylist = res2.text 55 const subPlaylist = res2.text
57 expect(subPlaylist).to.contain(`${videoUUID}-${resolution}-fragmented.mp4`) 56 expect(subPlaylist).to.contain(`${videoUUID}-${resolution}-fragmented.mp4`)
@@ -59,7 +58,7 @@ async function checkHlsPlaylist (servers: ServerInfo[], videoUUID: string) {
59 } 58 }
60 59
61 { 60 {
62 const baseUrl = 'http://localhost:9001/static/streaming-playlists/hls' 61 const baseUrl = 'http://localhost:' + server.port + '/static/streaming-playlists/hls'
63 62
64 for (const resolution of resolutions) { 63 for (const resolution of resolutions) {
65 await checkSegmentHash(baseUrl, baseUrl, videoUUID, resolution, hlsPlaylist) 64 await checkSegmentHash(baseUrl, baseUrl, videoUUID, resolution, hlsPlaylist)