aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r--server/tests/api/videos/video-transcoder.ts11
-rw-r--r--server/tests/api/videos/videos-filter.ts3
2 files changed, 8 insertions, 6 deletions
diff --git a/server/tests/api/videos/video-transcoder.ts b/server/tests/api/videos/video-transcoder.ts
index f9500d617..f88c59f0d 100644
--- a/server/tests/api/videos/video-transcoder.ts
+++ b/server/tests/api/videos/video-transcoder.ts
@@ -37,6 +37,7 @@ import {
37 getVideoFileFPS, 37 getVideoFileFPS,
38 getVideoFileResolution 38 getVideoFileResolution
39} from '../../../helpers/ffprobe-utils' 39} from '../../../helpers/ffprobe-utils'
40import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
40 41
41const expect = chai.expect 42const expect = chai.expect
42 43
@@ -280,7 +281,7 @@ describe('Test video transcoding', function () {
280 expect(videoToFindInList).to.be.undefined 281 expect(videoToFindInList).to.be.undefined
281 282
282 // Server 1 should not have the video yet 283 // Server 1 should not have the video yet
283 await getVideo(servers[0].url, videoId, 404) 284 await getVideo(servers[0].url, videoId, HttpStatusCode.NOT_FOUND_404)
284 } 285 }
285 286
286 await waitJobs(servers) 287 await waitJobs(servers)
@@ -400,8 +401,8 @@ describe('Test video transcoding', function () {
400 401
401 expect(videoDetails.files).to.have.lengthOf(1) 402 expect(videoDetails.files).to.have.lengthOf(1)
402 403
403 await makeGetRequest({ url: server.url, path: videoDetails.thumbnailPath, statusCodeExpected: 200 }) 404 await makeGetRequest({ url: server.url, path: videoDetails.thumbnailPath, statusCodeExpected: HttpStatusCode.OK_200 })
404 await makeGetRequest({ url: server.url, path: videoDetails.previewPath, statusCodeExpected: 200 }) 405 await makeGetRequest({ url: server.url, path: videoDetails.previewPath, statusCodeExpected: HttpStatusCode.OK_200 })
405 406
406 const magnetUri = videoDetails.files[0].magnetUri 407 const magnetUri = videoDetails.files[0].magnetUri
407 expect(magnetUri).to.contain('.mp4') 408 expect(magnetUri).to.contain('.mp4')
@@ -425,8 +426,8 @@ describe('Test video transcoding', function () {
425 426
426 expect(videoDetails.files).to.have.lengthOf(1) 427 expect(videoDetails.files).to.have.lengthOf(1)
427 428
428 await makeGetRequest({ url: server.url, path: videoDetails.thumbnailPath, statusCodeExpected: 200 }) 429 await makeGetRequest({ url: server.url, path: videoDetails.thumbnailPath, statusCodeExpected: HttpStatusCode.OK_200 })
429 await makeGetRequest({ url: server.url, path: videoDetails.previewPath, statusCodeExpected: 200 }) 430 await makeGetRequest({ url: server.url, path: videoDetails.previewPath, statusCodeExpected: HttpStatusCode.OK_200 })
430 431
431 const magnetUri = videoDetails.files[0].magnetUri 432 const magnetUri = videoDetails.files[0].magnetUri
432 expect(magnetUri).to.contain('.mp4') 433 expect(magnetUri).to.contain('.mp4')
diff --git a/server/tests/api/videos/videos-filter.ts b/server/tests/api/videos/videos-filter.ts
index 6b9a4b6d4..2961c8e78 100644
--- a/server/tests/api/videos/videos-filter.ts
+++ b/server/tests/api/videos/videos-filter.ts
@@ -15,10 +15,11 @@ import {
15} from '../../../../shared/extra-utils' 15} from '../../../../shared/extra-utils'
16import { Video, VideoPrivacy } from '../../../../shared/models/videos' 16import { Video, VideoPrivacy } from '../../../../shared/models/videos'
17import { UserRole } from '../../../../shared/models/users' 17import { UserRole } from '../../../../shared/models/users'
18import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
18 19
19const expect = chai.expect 20const expect = chai.expect
20 21
21async function getVideosNames (server: ServerInfo, token: string, filter: string, statusCodeExpected = 200) { 22async function getVideosNames (server: ServerInfo, token: string, filter: string, statusCodeExpected = HttpStatusCode.OK_200) {
22 const paths = [ 23 const paths = [
23 '/api/v1/video-channels/root_channel/videos', 24 '/api/v1/video-channels/root_channel/videos',
24 '/api/v1/accounts/root/videos', 25 '/api/v1/accounts/root/videos',