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/redundancy/redundancy-constraints.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/redundancy/redundancy-constraints.ts')
-rw-r--r-- | server/tests/api/redundancy/redundancy-constraints.ts | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/server/tests/api/redundancy/redundancy-constraints.ts b/server/tests/api/redundancy/redundancy-constraints.ts index 0378cc122..217691fb6 100644 --- a/server/tests/api/redundancy/redundancy-constraints.ts +++ b/server/tests/api/redundancy/redundancy-constraints.ts | |||
@@ -4,19 +4,18 @@ import 'mocha' | |||
4 | import { expect } from 'chai' | 4 | import { expect } from 'chai' |
5 | import { | 5 | import { |
6 | cleanupTests, | 6 | cleanupTests, |
7 | flushAndRunServer, | 7 | createSingleServer, |
8 | killallServers, | 8 | killallServers, |
9 | reRunServer, | 9 | PeerTubeServer, |
10 | ServerInfo, | ||
11 | setAccessTokensToServers, | 10 | setAccessTokensToServers, |
12 | waitJobs | 11 | waitJobs |
13 | } from '@shared/extra-utils' | 12 | } from '@shared/extra-utils' |
14 | import { VideoPrivacy } from '@shared/models' | 13 | import { VideoPrivacy } from '@shared/models' |
15 | 14 | ||
16 | describe('Test redundancy constraints', function () { | 15 | describe('Test redundancy constraints', function () { |
17 | let remoteServer: ServerInfo | 16 | let remoteServer: PeerTubeServer |
18 | let localServer: ServerInfo | 17 | let localServer: PeerTubeServer |
19 | let servers: ServerInfo[] | 18 | let servers: PeerTubeServer[] |
20 | 19 | ||
21 | const remoteServerConfig = { | 20 | const remoteServerConfig = { |
22 | redundancy: { | 21 | redundancy: { |
@@ -59,7 +58,7 @@ describe('Test redundancy constraints', function () { | |||
59 | this.timeout(120000) | 58 | this.timeout(120000) |
60 | 59 | ||
61 | { | 60 | { |
62 | remoteServer = await flushAndRunServer(1, remoteServerConfig) | 61 | remoteServer = await createSingleServer(1, remoteServerConfig) |
63 | } | 62 | } |
64 | 63 | ||
65 | { | 64 | { |
@@ -70,7 +69,7 @@ describe('Test redundancy constraints', function () { | |||
70 | } | 69 | } |
71 | } | 70 | } |
72 | } | 71 | } |
73 | localServer = await flushAndRunServer(2, config) | 72 | localServer = await createSingleServer(2, config) |
74 | } | 73 | } |
75 | 74 | ||
76 | servers = [ remoteServer, localServer ] | 75 | servers = [ remoteServer, localServer ] |
@@ -119,7 +118,7 @@ describe('Test redundancy constraints', function () { | |||
119 | } | 118 | } |
120 | } | 119 | } |
121 | await await killallServers([ localServer ]) | 120 | await await killallServers([ localServer ]) |
122 | await reRunServer(localServer, config) | 121 | await localServer.run(config) |
123 | 122 | ||
124 | await uploadWrapper('video 2 server 2') | 123 | await uploadWrapper('video 2 server 2') |
125 | 124 | ||
@@ -148,7 +147,7 @@ describe('Test redundancy constraints', function () { | |||
148 | } | 147 | } |
149 | } | 148 | } |
150 | await killallServers([ localServer ]) | 149 | await killallServers([ localServer ]) |
151 | await reRunServer(localServer, config) | 150 | await localServer.run(config) |
152 | 151 | ||
153 | await uploadWrapper('video 3 server 2') | 152 | await uploadWrapper('video 3 server 2') |
154 | 153 | ||