diff options
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/api/videos/resumable-upload.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/server/tests/api/videos/resumable-upload.ts b/server/tests/api/videos/resumable-upload.ts index 2fbefb392..9de622281 100644 --- a/server/tests/api/videos/resumable-upload.ts +++ b/server/tests/api/videos/resumable-upload.ts | |||
@@ -254,6 +254,24 @@ describe('Test resumable upload', function () { | |||
254 | expect(result2.headers['x-resumable-upload-cached']).to.not.exist | 254 | expect(result2.headers['x-resumable-upload-cached']).to.not.exist |
255 | }) | 255 | }) |
256 | 256 | ||
257 | it('Should not cache after video deletion', async function () { | ||
258 | const originalName = 'toto.mp4' | ||
259 | const lastModified = new Date().getTime() | ||
260 | |||
261 | const uploadId1 = await prepareUpload({ originalName, lastModified }) | ||
262 | const result1 = await sendChunks({ pathUploadId: uploadId1 }) | ||
263 | await server.videos.remove({ id: result1.body.video.uuid }) | ||
264 | |||
265 | const uploadId2 = await prepareUpload({ originalName, lastModified }) | ||
266 | const result2 = await sendChunks({ pathUploadId: uploadId2 }) | ||
267 | expect(result1.body.video.uuid).to.not.equal(result2.body.video.uuid) | ||
268 | |||
269 | expect(result2.headers['x-resumable-upload-cached']).to.not.exist | ||
270 | |||
271 | await checkFileSize(uploadId1, null) | ||
272 | await checkFileSize(uploadId2, null) | ||
273 | }) | ||
274 | |||
257 | it('Should refuse an invalid digest', async function () { | 275 | it('Should refuse an invalid digest', async function () { |
258 | const uploadId = await prepareUpload({ token: server.accessToken }) | 276 | const uploadId = await prepareUpload({ token: server.accessToken }) |
259 | 277 | ||