]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/check-params/logs.ts
Hide video abuses from muted accounts
[github/Chocobozzz/PeerTube.git] / server / tests / api / check-params / logs.ts
index 0948f7c5e6325fa0d3b6c0ec6f62bf060193b8ee..f9d96bcc0785089cc428ec7979c1f4aa5804ee46 100644 (file)
@@ -6,10 +6,11 @@ import {
   createUser,
   flushTests,
   killallServers,
-  runServer,
+  flushAndRunServer,
   ServerInfo,
   setAccessTokensToServers,
-  userLogin
+  userLogin,
+  cleanupTests
 } from '../../../../shared/extra-utils'
 import { makeGetRequest } from '../../../../shared/extra-utils/requests/requests'
 
@@ -23,9 +24,7 @@ describe('Test logs API validators', function () {
   before(async function () {
     this.timeout(120000)
 
-    await flushTests()
-
-    server = await runServer(1)
+    server = await flushAndRunServer(1)
 
     await setAccessTokensToServers([ server ])
 
@@ -107,11 +106,6 @@ describe('Test logs API validators', function () {
   })
 
   after(async function () {
-    killallServers([ server ])
-
-    // Keep the logs if the test failed
-    if (this['ok']) {
-      await flushTests()
-    }
+    await cleanupTests([ server ])
   })
 })