X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Factivitypub%2Frefresher.ts;h=bb81d4565f5b1f14ba9ca4dff39f5b6328e0aa1d;hb=7804e577de25345da51ac3d88f6121108012b523;hp=d2f71e85788cdb91bc0a9e253b598baaa5ff0b87;hpb=89d241a79c262b9775c233b73cff080043ebb5e6;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/activitypub/refresher.ts b/server/tests/api/activitypub/refresher.ts index d2f71e857..bb81d4565 100644 --- a/server/tests/api/activitypub/refresher.ts +++ b/server/tests/api/activitypub/refresher.ts @@ -1,23 +1,21 @@ /* 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 @@ -27,12 +25,16 @@ describe('Test AP refresher', function () { 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 @@ -95,7 +97,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 }) })