mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
replace numbers with typed http status codes (#3409)
This commit is contained in:
parent
adc1f09c0d
commit
2d53be0267
149 changed files with 1721 additions and 1108 deletions
|
@ -37,6 +37,7 @@ import {
|
|||
getVideoFileFPS,
|
||||
getVideoFileResolution
|
||||
} from '../../../helpers/ffprobe-utils'
|
||||
import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
|
||||
|
||||
const expect = chai.expect
|
||||
|
||||
|
@ -280,7 +281,7 @@ describe('Test video transcoding', function () {
|
|||
expect(videoToFindInList).to.be.undefined
|
||||
|
||||
// Server 1 should not have the video yet
|
||||
await getVideo(servers[0].url, videoId, 404)
|
||||
await getVideo(servers[0].url, videoId, HttpStatusCode.NOT_FOUND_404)
|
||||
}
|
||||
|
||||
await waitJobs(servers)
|
||||
|
@ -400,8 +401,8 @@ describe('Test video transcoding', function () {
|
|||
|
||||
expect(videoDetails.files).to.have.lengthOf(1)
|
||||
|
||||
await makeGetRequest({ url: server.url, path: videoDetails.thumbnailPath, statusCodeExpected: 200 })
|
||||
await makeGetRequest({ url: server.url, path: videoDetails.previewPath, statusCodeExpected: 200 })
|
||||
await makeGetRequest({ url: server.url, path: videoDetails.thumbnailPath, statusCodeExpected: HttpStatusCode.OK_200 })
|
||||
await makeGetRequest({ url: server.url, path: videoDetails.previewPath, statusCodeExpected: HttpStatusCode.OK_200 })
|
||||
|
||||
const magnetUri = videoDetails.files[0].magnetUri
|
||||
expect(magnetUri).to.contain('.mp4')
|
||||
|
@ -425,8 +426,8 @@ describe('Test video transcoding', function () {
|
|||
|
||||
expect(videoDetails.files).to.have.lengthOf(1)
|
||||
|
||||
await makeGetRequest({ url: server.url, path: videoDetails.thumbnailPath, statusCodeExpected: 200 })
|
||||
await makeGetRequest({ url: server.url, path: videoDetails.previewPath, statusCodeExpected: 200 })
|
||||
await makeGetRequest({ url: server.url, path: videoDetails.thumbnailPath, statusCodeExpected: HttpStatusCode.OK_200 })
|
||||
await makeGetRequest({ url: server.url, path: videoDetails.previewPath, statusCodeExpected: HttpStatusCode.OK_200 })
|
||||
|
||||
const magnetUri = videoDetails.files[0].magnetUri
|
||||
expect(magnetUri).to.contain('.mp4')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue