]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/video-captions.ts
Fix my-account{videos,video-playlists} loading mecanism
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / video-captions.ts
index 64265865a9fd027161df9128eef690b4ede4374b..6ddc20d691cd4685afff59a3e04eca0c86e57e67 100644 (file)
@@ -2,13 +2,12 @@
 
 import 'mocha'
 import {
+  cleanupTests,
   createUser,
-  flushTests,
-  killallServers,
+  flushAndRunServer,
   makeDeleteRequest,
   makeGetRequest,
   makeUploadRequest,
-  flushAndRunServer,
   ServerInfo,
   setAccessTokensToServers,
   uploadVideo,
@@ -125,22 +124,23 @@ describe('Test video captions API validator', function () {
       })
     })
 
-    it('Should fail with an invalid captionfile extension', async function () {
-      const attaches = {
-        'captionfile': join(__dirname, '..', '..', 'fixtures', 'subtitle-bad.txt')
-      }
-
-      const captionPath = path + videoUUID + '/captions/fr'
-      await makeUploadRequest({
-        method: 'PUT',
-        url: server.url,
-        path: captionPath,
-        token: server.accessToken,
-        fields,
-        attaches,
-        statusCodeExpected: 400
-      })
-    })
+    // We accept any file now
+    // it('Should fail with an invalid captionfile extension', async function () {
+    //   const attaches = {
+    //     'captionfile': join(__dirname, '..', '..', 'fixtures', 'subtitle-bad.txt')
+    //   }
+    //
+    //   const captionPath = path + videoUUID + '/captions/fr'
+    //   await makeUploadRequest({
+    //     method: 'PUT',
+    //     url: server.url,
+    //     path: captionPath,
+    //     token: server.accessToken,
+    //     fields,
+    //     attaches,
+    //     statusCodeExpected: 400
+    //   })
+    // })
 
     // We don't check the extension yet
     // it('Should fail with an invalid captionfile extension and octet-stream mime type', async function () {
@@ -269,7 +269,7 @@ describe('Test video captions API validator', function () {
     })
   })
 
-  after(function () {
-    killallServers([ server ])
+  after(async function () {
+    await cleanupTests([ server ])
   })
 })