aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-09-09 11:11:47 +0200
committerChocobozzz <me@florianbigard.com>2022-09-09 11:11:52 +0200
commit3d2e4f037125deb4711616ef6f9fa463b432ff3d (patch)
tree559643a17c7f931590a2fea60d07bf69860cd1e1 /server/tests
parente4fc3697acb27c4192cbbb63eb94272a6cf7ce32 (diff)
downloadPeerTube-3d2e4f037125deb4711616ef6f9fa463b432ff3d.tar.gz
PeerTube-3d2e4f037125deb4711616ef6f9fa463b432ff3d.tar.zst
PeerTube-3d2e4f037125deb4711616ef6f9fa463b432ff3d.zip
Update server dependencies
Diffstat (limited to 'server/tests')
-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 }