]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/video-description.ts
Soft delete video comments instead of detroy
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / video-description.ts
index c2985194c5c026b9ddde917bf81fe25fe3b768d0..db4d278bf15adcafcbfff0fac7f06f956274ce7e 100644 (file)
@@ -3,8 +3,8 @@
 import * as chai from 'chai'
 import 'mocha'
 import {
+  cleanupTests,
   flushAndRunMultipleServers,
-  flushTests,
   getVideo,
   getVideoDescription,
   getVideosList,
@@ -12,10 +12,10 @@ import {
   ServerInfo,
   setAccessTokensToServers,
   updateVideo,
-  uploadVideo,
-  wait
-} from '../../utils/index'
-import { doubleFollow } from '../../utils/server/follows'
+  uploadVideo
+} from '../../../../shared/extra-utils/index'
+import { doubleFollow } from '../../../../shared/extra-utils/server/follows'
+import { waitJobs } from '../../../../shared/extra-utils/server/jobs'
 
 const expect = chai.expect
 
@@ -46,7 +46,7 @@ describe('Test video description', function () {
     }
     await uploadVideo(servers[0].url, servers[0].accessToken, attributes)
 
-    await wait(5000)
+    await waitJobs(servers)
 
     const res = await getVideosList(servers[0].url)
 
@@ -85,7 +85,7 @@ describe('Test video description', function () {
     }
     await updateVideo(servers[0].url, servers[0].accessToken, videoId, attributes)
 
-    await wait(5000)
+    await waitJobs(servers)
   })
 
   it('Should have a small description on each server', async function () {
@@ -101,11 +101,6 @@ describe('Test video description', function () {
   })
 
   after(async function () {
-    killallServers(servers)
-
-    // Keep the logs if the test failed
-    if (this['ok']) {
-      await flushTests()
-    }
+    await cleanupTests(servers)
   })
 })