]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/server/auto-follows.ts
Fix missing delete cascade video -> channel
[github/Chocobozzz/PeerTube.git] / server / tests / api / server / auto-follows.ts
index e04d70af4a44dc77d6ca3576181566d0e97ed3af..1519b263fb0eb54dac0c53d3b69b817a83fd800b 100644 (file)
@@ -1,7 +1,7 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
-import * as chai from 'chai'
 import 'mocha'
+import * as chai from 'chai'
 import {
   acceptFollower,
   cleanupTests,
@@ -153,9 +153,10 @@ describe('Test auto follows', function () {
 
   describe('Auto follow index', function () {
     const instanceIndexServer = new MockInstancesIndex()
+    let port: number
 
     before(async () => {
-      await instanceIndexServer.initialize()
+      port = await instanceIndexServer.initialize()
     })
 
     it('Should not auto follow index if the option is not enabled', async function () {
@@ -177,7 +178,7 @@ describe('Test auto follows', function () {
         followings: {
           instance: {
             autoFollowIndex: {
-              indexUrl: 'http://localhost:42101/api/v1/instances/hosts',
+              indexUrl: `http://localhost:${port}/api/v1/instances/hosts`,
               enabled: true
             }
           }