]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/redundancy/redundancy-constraints.ts
Add runner server tests
[github/Chocobozzz/PeerTube.git] / server / tests / api / redundancy / redundancy-constraints.ts
index 25cd11658d48c80ebc998b90aa726b14cba0ad3d..c86573168df6ac650e74d2a98c86365cb9dbad32 100644 (file)
@@ -1,9 +1,15 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
-import 'mocha'
 import { expect } from 'chai'
-import { cleanupTests, createSingleServer, killallServers, PeerTubeServer, setAccessTokensToServers, waitJobs } from '@shared/extra-utils'
 import { VideoPrivacy } from '@shared/models'
+import {
+  cleanupTests,
+  createSingleServer,
+  killallServers,
+  PeerTubeServer,
+  setAccessTokensToServers,
+  waitJobs
+} from '@shared/server-commands'
 
 describe('Test redundancy constraints', function () {
   let remoteServer: PeerTubeServer
@@ -75,7 +81,7 @@ describe('Test redundancy constraints', function () {
     await waitJobs(servers)
 
     // Server 1 and server 2 follow each other
-    await remoteServer.follows.follow({ targets: [ localServer.url ] })
+    await remoteServer.follows.follow({ hosts: [ localServer.url ] })
     await waitJobs(servers)
     await remoteServer.redundancy.updateRedundancy({ host: localServer.host, redundancyAllowed: true })
 
@@ -161,7 +167,7 @@ describe('Test redundancy constraints', function () {
   it('Should have redundancy on server 1 and on server 2 with followings filter now server 2 follows server 1', async function () {
     this.timeout(120000)
 
-    await localServer.follows.follow({ targets: [ remoteServer.url ] })
+    await localServer.follows.follow({ hosts: [ remoteServer.url ] })
     await waitJobs(servers)
 
     await uploadWrapper('video 4 server 2')