]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/resumable-upload.ts
Introduce blocklist command
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / resumable-upload.ts
index af9221c43b94749f507dda9323b58f2d84162fc2..6c01c7e78f0d38e153a745e52e1c06c24ff35765 100644 (file)
@@ -8,10 +8,10 @@ import { HttpStatusCode } from '@shared/core-utils'
 import {
   buildAbsoluteFixturePath,
   buildServerDirectory,
+  cleanupTests,
   flushAndRunServer,
   getMyUserInformation,
   prepareResumableUpload,
-  sendDebugCommand,
   sendResumableChunks,
   ServerInfo,
   setAccessTokensToServers,
@@ -137,13 +137,13 @@ describe('Test resumable upload', function () {
     })
 
     it('Should not delete recent uploads', async function () {
-      await sendDebugCommand(server.url, server.accessToken, { command: 'remove-dandling-resumable-uploads' })
+      await server.debugCommand.sendCommand({ body: { command: 'remove-dandling-resumable-uploads' } })
 
       expect(await countResumableUploads()).to.equal(2)
     })
 
     it('Should delete old uploads', async function () {
-      await sendDebugCommand(server.url, server.accessToken, { command: 'remove-dandling-resumable-uploads' })
+      await server.debugCommand.sendCommand({ body: { command: 'remove-dandling-resumable-uploads' } })
 
       expect(await countResumableUploads()).to.equal(0)
     })
@@ -184,4 +184,7 @@ describe('Test resumable upload', function () {
     })
   })
 
+  after(async function () {
+    await cleanupTests([ server ])
+  })
 })