/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
import 'mocha'
-import { HttpStatusCode } from '@shared/core-utils'
+import { wait } from '@shared/core-utils'
+import { HttpStatusCode, VideoPlaylistPrivacy } from '@shared/models'
import {
cleanupTests,
+ createMultipleServers,
doubleFollow,
- flushAndRunMultipleServers,
killallServers,
- reRunServer,
- ServerInfo,
+ PeerTubeServer,
setAccessTokensToServers,
setDefaultVideoChannel,
- wait,
waitJobs
-} from '@shared/extra-utils'
-import { VideoPlaylistPrivacy } from '@shared/models'
+} from '@shared/server-commands'
describe('Test AP refresher', function () {
- let servers: ServerInfo[] = []
+ let servers: PeerTubeServer[] = []
let videoUUID1: string
let videoUUID2: string
let videoUUID3: string
before(async function () {
this.timeout(60000)
- servers = await flushAndRunMultipleServers(2, { transcoding: { enabled: false } })
+ servers = await createMultipleServers(2)
// Get the access tokens
await setAccessTokensToServers(servers)
await setDefaultVideoChannel(servers)
+ for (const server of servers) {
+ await server.config.disableTranscoding()
+ }
+
{
videoUUID1 = (await servers[1].videos.quickUpload({ name: 'video1' })).uuid
videoUUID2 = (await servers[1].videos.quickUpload({ name: 'video2' })).uuid
// The refresh should fail
await waitJobs([ servers[0] ])
- await reRunServer(servers[1])
+ await servers[1].run()
await servers[0].videos.get({ id: videoUUID3 })
})