]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/server/handle-down.ts
Rename jobs list command
[github/Chocobozzz/PeerTube.git] / server / tests / api / server / handle-down.ts
index 5f20b00931f191d541b8ba5089ef6a025a782494..b3255a72135e692f8bc8753ba87e084ea2a566bb 100644 (file)
@@ -2,7 +2,6 @@
 
 import 'mocha'
 import * as chai from 'chai'
-import { HttpStatusCode } from '@shared/core-utils'
 import {
   cleanupTests,
   CommentsCommand,
@@ -14,7 +13,7 @@ import {
   wait,
   waitJobs
 } from '@shared/extra-utils'
-import { JobState, VideoCreateResult, VideoPrivacy } from '@shared/models'
+import { HttpStatusCode, JobState, VideoCreateResult, VideoPrivacy } from '@shared/models'
 
 const expect = chai.expect
 
@@ -98,8 +97,8 @@ describe('Test handle downs', function () {
     this.timeout(240000)
 
     // Server 2 and 3 follow server 1
-    await servers[1].follows.follow({ targets: [ servers[0].url ] })
-    await servers[2].follows.follow({ targets: [ servers[0].url ] })
+    await servers[1].follows.follow({ hosts: [ servers[0].url ] })
+    await servers[2].follows.follow({ hosts: [ servers[0].url ] })
 
     await waitJobs(servers)
 
@@ -162,7 +161,7 @@ describe('Test handle downs', function () {
     const states: JobState[] = [ 'waiting', 'active' ]
 
     for (const state of states) {
-      const body = await servers[0].jobs.getJobsList({
+      const body = await servers[0].jobs.list({
         state: state,
         start: 0,
         count: 50,
@@ -181,7 +180,7 @@ describe('Test handle downs', function () {
     await servers[1].follows.unfollow({ target: servers[0] })
     await waitJobs(servers)
 
-    await servers[1].follows.follow({ targets: [ servers[0].url ] })
+    await servers[1].follows.follow({ hosts: [ servers[0].url ] })
 
     await waitJobs(servers)