]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/tests/api/activitypub/refresher.ts
Add ability to run transcoding jobs
[github/Chocobozzz/PeerTube.git] / server / tests / api / activitypub / refresher.ts
index d2f71e85788cdb91bc0a9e253b598baaa5ff0b87..81fee004471c2a348884f7271ecce2385443c8c6 100644 (file)
@@ -1,23 +1,21 @@
 /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
 
 import 'mocha'
-import { HttpStatusCode } from '@shared/core-utils'
 import {
   cleanupTests,
+  createMultipleServers,
   doubleFollow,
-  flushAndRunMultipleServers,
   killallServers,
-  reRunServer,
-  ServerInfo,
+  PeerTubeServer,
   setAccessTokensToServers,
   setDefaultVideoChannel,
   wait,
   waitJobs
 } from '@shared/extra-utils'
-import { VideoPlaylistPrivacy } from '@shared/models'
+import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models'
 
 describe('Test AP refresher', function () {
-  let servers: ServerInfo[] = []
+  let servers: PeerTubeServer[] = []
   let videoUUID1: string
   let videoUUID2: string
   let videoUUID3: string
@@ -27,7 +25,7 @@ describe('Test AP refresher', function () {
   before(async function () {
     this.timeout(60000)
 
-    servers = await flushAndRunMultipleServers(2, { transcoding: { enabled: false } })
+    servers = await createMultipleServers(2, { transcoding: { enabled: false } })
 
     // Get the access tokens
     await setAccessTokensToServers(servers)
@@ -95,7 +93,7 @@ describe('Test AP refresher', function () {
       // The refresh should fail
       await waitJobs([ servers[0] ])
 
-      await reRunServer(servers[1])
+      await servers[1].run()
 
       await servers[0].videos.get({ id: videoUUID3 })
     })