]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/videos/video-channels.ts
Redundancy and search tests in parallel too
[github/Chocobozzz/PeerTube.git] / server / tests / api / videos / video-channels.ts
index 60b84e443783f0f7697879e419ea53333a38c32a..f091484049ba5548c3e397db31c20fa9aa522e07 100644 (file)
@@ -4,6 +4,7 @@ import * as chai from 'chai'
 import 'mocha'
 import { User, Video } from '../../../../shared/index'
 import {
+  cleanupTests,
   createUser,
   doubleFollow,
   flushAndRunMultipleServers,
@@ -212,7 +213,7 @@ describe('Test video channels', function () {
     this.timeout(10000)
 
     for (const server of servers) {
-      const channelURI = 'second_video_channel@localhost:9001'
+      const channelURI = 'second_video_channel@localhost:' + server.port
       const res1 = await getVideoChannelVideos(server.url, server.accessToken, channelURI, 0, 5)
       expect(res1.body.total).to.equal(1)
       expect(res1.body.data).to.be.an('array')
@@ -233,11 +234,11 @@ describe('Test video channels', function () {
     this.timeout(10000)
 
     for (const server of servers) {
-      const secondChannelURI = 'second_video_channel@localhost:9001'
+      const secondChannelURI = 'second_video_channel@localhost:' + server.port
       const res1 = await getVideoChannelVideos(server.url, server.accessToken, secondChannelURI, 0, 5)
       expect(res1.body.total).to.equal(0)
 
-      const channelURI = 'root_channel@localhost:9001'
+      const channelURI = 'root_channel@localhost:' + server.port
       const res2 = await getVideoChannelVideos(server.url, server.accessToken, channelURI, 0, 5)
       expect(res2.body.total).to.equal(1)
 
@@ -277,7 +278,7 @@ describe('Test video channels', function () {
     }
   })
 
-  after(function () {
-    killallServers(servers)
+  after(async function () {
+    await cleanupTests(servers)
   })
 })