aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/video-hls.ts
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-12-08 21:16:10 +0100
committerGitHub <noreply@github.com>2020-12-08 21:16:10 +0100
commitf2eb23cd87cf32b8fe545178143b5f49e06a58da (patch)
treeaf7d59945af70e28fd85047e2c688c59a908f548 /server/tests/api/videos/video-hls.ts
parentc977fd3ec931c059111ddb2b8d6ddbb20b6b99a1 (diff)
downloadPeerTube-f2eb23cd87cf32b8fe545178143b5f49e06a58da.tar.gz
PeerTube-f2eb23cd87cf32b8fe545178143b5f49e06a58da.tar.zst
PeerTube-f2eb23cd87cf32b8fe545178143b5f49e06a58da.zip
emit more specific status codes on video upload (#3423)
- reduce http status codes list to potentially useful codes - convert more codes to typed ones - factorize html generator for error responses
Diffstat (limited to 'server/tests/api/videos/video-hls.ts')
-rw-r--r--server/tests/api/videos/video-hls.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/server/tests/api/videos/video-hls.ts b/server/tests/api/videos/video-hls.ts
index 3a65cc1d2..f3dbbb114 100644
--- a/server/tests/api/videos/video-hls.ts
+++ b/server/tests/api/videos/video-hls.ts
@@ -26,6 +26,7 @@ import {
26import { VideoDetails } from '../../../../shared/models/videos' 26import { VideoDetails } from '../../../../shared/models/videos'
27import { VideoStreamingPlaylistType } from '../../../../shared/models/videos/video-streaming-playlist.type' 27import { VideoStreamingPlaylistType } from '../../../../shared/models/videos/video-streaming-playlist.type'
28import { DEFAULT_AUDIO_RESOLUTION } from '../../../initializers/constants' 28import { DEFAULT_AUDIO_RESOLUTION } from '../../../initializers/constants'
29import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
29 30
30const expect = chai.expect 31const expect = chai.expect
31 32
@@ -57,8 +58,8 @@ async function checkHlsPlaylist (servers: ServerInfo[], videoUUID: string, hlsOn
57 ) 58 )
58 expect(file.resolution.label).to.equal(resolution + 'p') 59 expect(file.resolution.label).to.equal(resolution + 'p')
59 60
60 await makeRawRequest(file.torrentUrl, 200) 61 await makeRawRequest(file.torrentUrl, HttpStatusCode.OK_200)
61 await makeRawRequest(file.fileUrl, 200) 62 await makeRawRequest(file.fileUrl, HttpStatusCode.OK_200)
62 63
63 const torrent = await webtorrentAdd(file.magnetUri, true) 64 const torrent = await webtorrentAdd(file.magnetUri, true)
64 expect(torrent.files).to.be.an('array') 65 expect(torrent.files).to.be.an('array')
@@ -144,8 +145,8 @@ describe('Test HLS videos', function () {
144 await waitJobs(servers) 145 await waitJobs(servers)
145 146
146 for (const server of servers) { 147 for (const server of servers) {
147 await getVideo(server.url, videoUUID, 404) 148 await getVideo(server.url, videoUUID, HttpStatusCode.NOT_FOUND_404)
148 await getVideo(server.url, videoAudioUUID, 404) 149 await getVideo(server.url, videoAudioUUID, HttpStatusCode.NOT_FOUND_404)
149 } 150 }
150 }) 151 })
151 152