]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/follows.ts
Fix broken playlist api
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / follows.ts
index 5bb337682f46d296e4052904a5c95292c820330e..2eb54cb0a7ee1f90f29155d3ee923f835ffd3873 100644 (file)
@@ -3,14 +3,20 @@
 import 'mocha'
 
 import {
-  createUser, flushTests, killallServers, makeDeleteRequest, makePostBodyRequest, runServer, ServerInfo, setAccessTokensToServers,
+  cleanupTests,
+  createUser,
+  flushAndRunServer,
+  makeDeleteRequest,
+  makePostBodyRequest,
+  ServerInfo,
+  setAccessTokensToServers,
   userLogin
-} from '../../../../shared/utils'
+} from '../../../../shared/extra-utils'
 import {
   checkBadCountPagination,
   checkBadSortPagination,
   checkBadStartPagination
-} from '../../../../shared/utils/requests/check-api-params'
+} from '../../../../shared/extra-utils/requests/check-api-params'
 
 describe('Test server follows API validators', function () {
   let server: ServerInfo
@@ -20,8 +26,7 @@ describe('Test server follows API validators', function () {
   before(async function () {
     this.timeout(30000)
 
-    await flushTests()
-    server = await runServer(1)
+    server = await flushAndRunServer(1)
 
     await setAccessTokensToServers([ server ])
   })
@@ -297,11 +302,6 @@ describe('Test server follows API validators', function () {
   })
 
   after(async function () {
-    killallServers([ server ])
-
-    // Keep the logs if the test failed
-    if (this['ok']) {
-      await flushTests()
-    }
+    await cleanupTests([ server ])
   })
 })