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/plugins/plugin-helpers.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/plugins/plugin-helpers.ts')
-rw-r--r-- | server/tests/plugins/plugin-helpers.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/tests/plugins/plugin-helpers.ts b/server/tests/plugins/plugin-helpers.ts index cf16aaa9d..1d87b84ae 100644 --- a/server/tests/plugins/plugin-helpers.ts +++ b/server/tests/plugins/plugin-helpers.ts | |||
@@ -7,16 +7,16 @@ import { | |||
7 | checkVideoFilesWereRemoved, | 7 | checkVideoFilesWereRemoved, |
8 | cleanupTests, | 8 | cleanupTests, |
9 | doubleFollow, | 9 | doubleFollow, |
10 | flushAndRunMultipleServers, | 10 | createMultipleServers, |
11 | makeGetRequest, | 11 | makeGetRequest, |
12 | makePostBodyRequest, | 12 | makePostBodyRequest, |
13 | PluginsCommand, | 13 | PluginsCommand, |
14 | ServerInfo, | 14 | PeerTubeServer, |
15 | setAccessTokensToServers, | 15 | setAccessTokensToServers, |
16 | waitJobs | 16 | waitJobs |
17 | } from '@shared/extra-utils' | 17 | } from '@shared/extra-utils' |
18 | 18 | ||
19 | function postCommand (server: ServerInfo, command: string, bodyArg?: object) { | 19 | function postCommand (server: PeerTubeServer, command: string, bodyArg?: object) { |
20 | const body = { command } | 20 | const body = { command } |
21 | if (bodyArg) Object.assign(body, bodyArg) | 21 | if (bodyArg) Object.assign(body, bodyArg) |
22 | 22 | ||
@@ -29,12 +29,12 @@ function postCommand (server: ServerInfo, command: string, bodyArg?: object) { | |||
29 | } | 29 | } |
30 | 30 | ||
31 | describe('Test plugin helpers', function () { | 31 | describe('Test plugin helpers', function () { |
32 | let servers: ServerInfo[] | 32 | let servers: PeerTubeServer[] |
33 | 33 | ||
34 | before(async function () { | 34 | before(async function () { |
35 | this.timeout(60000) | 35 | this.timeout(60000) |
36 | 36 | ||
37 | servers = await flushAndRunMultipleServers(2) | 37 | servers = await createMultipleServers(2) |
38 | await setAccessTokensToServers(servers) | 38 | await setAccessTokensToServers(servers) |
39 | 39 | ||
40 | await doubleFollow(servers[0], servers[1]) | 40 | await doubleFollow(servers[0], servers[1]) |