aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/videos/resumable-upload.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/tests/api/videos/resumable-upload.ts b/server/tests/api/videos/resumable-upload.ts
index 0625828a1..0cf1e6675 100644
--- a/server/tests/api/videos/resumable-upload.ts
+++ b/server/tests/api/videos/resumable-upload.ts
@@ -169,11 +169,11 @@ describe('Test resumable upload', function () {
169 it('Should not accept more chunks than expected with an invalid content length/content range', async function () { 169 it('Should not accept more chunks than expected with an invalid content length/content range', async function () {
170 const uploadId = await prepareUpload({ size: 1500 }) 170 const uploadId = await prepareUpload({ size: 1500 })
171 171
172 // Content length check seems to have changed in v16 172 // Content length check can be different depending on the node version
173 if (process.version.startsWith('v16')) { 173 try {
174 await sendChunks({ pathUploadId: uploadId, expectedStatus: HttpStatusCode.CONFLICT_409, contentLength: 1000 }) 174 await sendChunks({ pathUploadId: uploadId, expectedStatus: HttpStatusCode.CONFLICT_409, contentLength: 1000 })
175 await checkFileSize(uploadId, 1000) 175 await checkFileSize(uploadId, 0)
176 } else { 176 } catch {
177 await sendChunks({ pathUploadId: uploadId, expectedStatus: HttpStatusCode.BAD_REQUEST_400, contentLength: 1000 }) 177 await sendChunks({ pathUploadId: uploadId, expectedStatus: HttpStatusCode.BAD_REQUEST_400, contentLength: 1000 })
178 await checkFileSize(uploadId, 0) 178 await checkFileSize(uploadId, 0)
179 } 179 }