aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/resumable-upload.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/videos/resumable-upload.ts')
-rw-r--r--server/tests/api/videos/resumable-upload.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/tests/api/videos/resumable-upload.ts b/server/tests/api/videos/resumable-upload.ts
index c94d92cf2..857859fd3 100644
--- a/server/tests/api/videos/resumable-upload.ts
+++ b/server/tests/api/videos/resumable-upload.ts
@@ -170,8 +170,13 @@ describe('Test resumable upload', function () {
170 170
171 const size = 1000 171 const size = 1000
172 172
173 // Content length check seems to have changed in v16
174 const expectedStatus = process.version.startsWith('v16')
175 ? HttpStatusCode.CONFLICT_409
176 : HttpStatusCode.BAD_REQUEST_400
177
173 const contentRangeBuilder = (start: number) => `bytes ${start}-${start + size - 1}/${size}` 178 const contentRangeBuilder = (start: number) => `bytes ${start}-${start + size - 1}/${size}`
174 await sendChunks({ pathUploadId: uploadId, expectedStatus: HttpStatusCode.CONFLICT_409, contentRangeBuilder, contentLength: size }) 179 await sendChunks({ pathUploadId: uploadId, expectedStatus, contentRangeBuilder, contentLength: size })
175 await checkFileSize(uploadId, 0) 180 await checkFileSize(uploadId, 0)
176 }) 181 })
177 }) 182 })