diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-16 09:47:51 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:18 +0200 |
commit | 254d3579f5338f5fd775c17d15cdfc37078bcfb4 (patch) | |
tree | eaeb13fda16c16e98cd6991d202b0ca6a4cbdb63 /server/tests/api/activitypub/refresher.ts | |
parent | 89d241a79c262b9775c233b73cff080043ebb5e6 (diff) | |
download | PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.gz PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.zst PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.zip |
Use an object to represent a server
Diffstat (limited to 'server/tests/api/activitypub/refresher.ts')
-rw-r--r-- | server/tests/api/activitypub/refresher.ts | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/server/tests/api/activitypub/refresher.ts b/server/tests/api/activitypub/refresher.ts index d2f71e857..bbec0d309 100644 --- a/server/tests/api/activitypub/refresher.ts +++ b/server/tests/api/activitypub/refresher.ts | |||
@@ -5,10 +5,9 @@ import { HttpStatusCode } from '@shared/core-utils' | |||
5 | import { | 5 | import { |
6 | cleanupTests, | 6 | cleanupTests, |
7 | doubleFollow, | 7 | doubleFollow, |
8 | flushAndRunMultipleServers, | 8 | createMultipleServers, |
9 | killallServers, | 9 | killallServers, |
10 | reRunServer, | 10 | PeerTubeServer, |
11 | ServerInfo, | ||
12 | setAccessTokensToServers, | 11 | setAccessTokensToServers, |
13 | setDefaultVideoChannel, | 12 | setDefaultVideoChannel, |
14 | wait, | 13 | wait, |
@@ -17,7 +16,7 @@ import { | |||
17 | import { VideoPlaylistPrivacy } from '@shared/models' | 16 | import { VideoPlaylistPrivacy } from '@shared/models' |
18 | 17 | ||
19 | describe('Test AP refresher', function () { | 18 | describe('Test AP refresher', function () { |
20 | let servers: ServerInfo[] = [] | 19 | let servers: PeerTubeServer[] = [] |
21 | let videoUUID1: string | 20 | let videoUUID1: string |
22 | let videoUUID2: string | 21 | let videoUUID2: string |
23 | let videoUUID3: string | 22 | let videoUUID3: string |
@@ -27,7 +26,7 @@ describe('Test AP refresher', function () { | |||
27 | before(async function () { | 26 | before(async function () { |
28 | this.timeout(60000) | 27 | this.timeout(60000) |
29 | 28 | ||
30 | servers = await flushAndRunMultipleServers(2, { transcoding: { enabled: false } }) | 29 | servers = await createMultipleServers(2, { transcoding: { enabled: false } }) |
31 | 30 | ||
32 | // Get the access tokens | 31 | // Get the access tokens |
33 | await setAccessTokensToServers(servers) | 32 | await setAccessTokensToServers(servers) |
@@ -95,7 +94,7 @@ describe('Test AP refresher', function () { | |||
95 | // The refresh should fail | 94 | // The refresh should fail |
96 | await waitJobs([ servers[0] ]) | 95 | await waitJobs([ servers[0] ]) |
97 | 96 | ||
98 | await reRunServer(servers[1]) | 97 | await servers[1].run() |
99 | 98 | ||
100 | await servers[0].videos.get({ id: videoUUID3 }) | 99 | await servers[0].videos.get({ id: videoUUID3 }) |
101 | }) | 100 | }) |