diff options
Diffstat (limited to 'server/tests/api/videos/resumable-upload.ts')
-rw-r--r-- | server/tests/api/videos/resumable-upload.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/server/tests/api/videos/resumable-upload.ts b/server/tests/api/videos/resumable-upload.ts index 59970aa94..6b5e0c09d 100644 --- a/server/tests/api/videos/resumable-upload.ts +++ b/server/tests/api/videos/resumable-upload.ts | |||
@@ -180,6 +180,21 @@ describe('Test resumable upload', function () { | |||
180 | await sendChunks({ pathUploadId: uploadId, expectedStatus, contentRangeBuilder, contentLength: size }) | 180 | await sendChunks({ pathUploadId: uploadId, expectedStatus, contentRangeBuilder, contentLength: size }) |
181 | await checkFileSize(uploadId, 0) | 181 | await checkFileSize(uploadId, 0) |
182 | }) | 182 | }) |
183 | |||
184 | it('Should be able to accept 2 PUT requests', async function () { | ||
185 | const uploadId = await prepareUpload() | ||
186 | |||
187 | const result1 = await sendChunks({ pathUploadId: uploadId }) | ||
188 | const result2 = await sendChunks({ pathUploadId: uploadId }) | ||
189 | |||
190 | expect(result1.body.video.uuid).to.exist | ||
191 | expect(result1.body.video.uuid).to.equal(result2.body.video.uuid) | ||
192 | |||
193 | expect(result1.headers['x-resumable-upload-cached']).to.not.exist | ||
194 | expect(result2.headers['x-resumable-upload-cached']).to.equal('true') | ||
195 | |||
196 | await checkFileSize(uploadId, null) | ||
197 | }) | ||
183 | }) | 198 | }) |
184 | 199 | ||
185 | after(async function () { | 200 | after(async function () { |