aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/multiple-servers.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/multiple-servers.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/multiple-servers.ts')
-rw-r--r--server/tests/api/videos/multiple-servers.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts
index fdd5e33f3..f754df04e 100644
--- a/server/tests/api/videos/multiple-servers.ts
+++ b/server/tests/api/videos/multiple-servers.ts
@@ -41,6 +41,7 @@ import {
41 findCommentId 41 findCommentId
42} from '../../../../shared/extra-utils/videos/video-comments' 42} from '../../../../shared/extra-utils/videos/video-comments'
43import { waitJobs } from '../../../../shared/extra-utils/server/jobs' 43import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
44import { HttpStatusCode } from '../../../../shared/core-utils/miscs/http-error-codes'
44 45
45const expect = chai.expect 46const expect = chai.expect
46 47
@@ -999,7 +1000,7 @@ describe('Test multiple servers', function () {
999 expect(res.body.downloadEnabled).to.be.false 1000 expect(res.body.downloadEnabled).to.be.false
1000 1001
1001 const text = 'my super forbidden comment' 1002 const text = 'my super forbidden comment'
1002 await addVideoCommentThread(server.url, server.accessToken, videoUUID, text, 409) 1003 await addVideoCommentThread(server.url, server.accessToken, videoUUID, text, HttpStatusCode.CONFLICT_409)
1003 } 1004 }
1004 }) 1005 })
1005 }) 1006 })
@@ -1021,7 +1022,7 @@ describe('Test multiple servers', function () {
1021 const filePath = join(__dirname, '..', '..', 'fixtures', 'video_short.webm') 1022 const filePath = join(__dirname, '..', '..', 'fixtures', 'video_short.webm')
1022 1023
1023 await req.attach('videofile', filePath) 1024 await req.attach('videofile', filePath)
1024 .expect(200) 1025 .expect(HttpStatusCode.OK_200)
1025 1026
1026 await waitJobs(servers) 1027 await waitJobs(servers)
1027 1028