]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/resumable-upload.ts
Use random names for VOD HLS playlists
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / resumable-upload.ts
index c94d92cf227ce560b47c87a8e0c6c845ac85b151..857859fd3a95c4209bd361b052871caf6dea3d44 100644 (file)
@@ -170,8 +170,13 @@ describe('Test resumable upload', function () {
 
       const size = 1000
 
+      // Content length check seems to have changed in v16
+      const expectedStatus = process.version.startsWith('v16')
+        ? HttpStatusCode.CONFLICT_409
+        : HttpStatusCode.BAD_REQUEST_400
+
       const contentRangeBuilder = (start: number) => `bytes ${start}-${start + size - 1}/${size}`
-      await sendChunks({ pathUploadId: uploadId, expectedStatus: HttpStatusCode.CONFLICT_409, contentRangeBuilder, contentLength: size })
+      await sendChunks({ pathUploadId: uploadId, expectedStatus, contentRangeBuilder, contentLength: size })
       await checkFileSize(uploadId, 0)
     })
   })