]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/video-blacklist.ts
Add refresh video on search
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / video-blacklist.ts
index d1cefa5d701a0a08d59f9f1557c3ffeeb6f6418d..de4c68f1dd10a4c218d3dc171272854a06b0db81 100644 (file)
@@ -5,16 +5,15 @@ import 'mocha'
 import {
   addVideoToBlacklist,
   flushAndRunMultipleServers,
-  flushTests,
   getVideosList,
   killallServers,
   searchVideo,
   ServerInfo,
   setAccessTokensToServers,
-  uploadVideo,
-  wait
+  uploadVideo
 } from '../../utils/index'
 import { doubleFollow } from '../../utils/server/follows'
+import { waitJobs } from '../../utils/server/jobs'
 
 const expect = chai.expect
 
@@ -41,7 +40,7 @@ describe('Test video blacklists', function () {
     await uploadVideo(servers[1].url, servers[1].accessToken, videoAttributes)
 
     // Wait videos propagation, server 2 has transcoding enabled
-    await wait(10000)
+    await waitJobs(servers)
 
     const res = await getVideosList(servers[0].url)
     const videos = res.body.data
@@ -89,10 +88,5 @@ describe('Test video blacklists', function () {
 
   after(async function () {
     killallServers(servers)
-
-    // Keep the logs if the test failed
-    if (this['ok']) {
-      await flushTests()
-    }
   })
 })