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/live/live.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/live/live.ts')
-rw-r--r-- | server/tests/api/live/live.ts | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/server/tests/api/live/live.ts b/server/tests/api/live/live.ts index 2cce1f448..7cfac522c 100644 --- a/server/tests/api/live/live.ts +++ b/server/tests/api/live/live.ts | |||
@@ -11,13 +11,12 @@ import { | |||
11 | checkResolutionsInMasterPlaylist, | 11 | checkResolutionsInMasterPlaylist, |
12 | cleanupTests, | 12 | cleanupTests, |
13 | doubleFollow, | 13 | doubleFollow, |
14 | flushAndRunMultipleServers, | 14 | createMultipleServers, |
15 | killallServers, | 15 | killallServers, |
16 | LiveCommand, | 16 | LiveCommand, |
17 | makeRawRequest, | 17 | makeRawRequest, |
18 | reRunServer, | ||
19 | sendRTMPStream, | 18 | sendRTMPStream, |
20 | ServerInfo, | 19 | PeerTubeServer, |
21 | setAccessTokensToServers, | 20 | setAccessTokensToServers, |
22 | setDefaultVideoChannel, | 21 | setDefaultVideoChannel, |
23 | stopFfmpeg, | 22 | stopFfmpeg, |
@@ -32,13 +31,13 @@ import { LiveVideo, LiveVideoCreate, VideoDetails, VideoPrivacy, VideoState, Vid | |||
32 | const expect = chai.expect | 31 | const expect = chai.expect |
33 | 32 | ||
34 | describe('Test live', function () { | 33 | describe('Test live', function () { |
35 | let servers: ServerInfo[] = [] | 34 | let servers: PeerTubeServer[] = [] |
36 | let commands: LiveCommand[] | 35 | let commands: LiveCommand[] |
37 | 36 | ||
38 | before(async function () { | 37 | before(async function () { |
39 | this.timeout(120000) | 38 | this.timeout(120000) |
40 | 39 | ||
41 | servers = await flushAndRunMultipleServers(2) | 40 | servers = await createMultipleServers(2) |
42 | 41 | ||
43 | // Get the access tokens | 42 | // Get the access tokens |
44 | await setAccessTokensToServers(servers) | 43 | await setAccessTokensToServers(servers) |
@@ -571,7 +570,7 @@ describe('Test live', function () { | |||
571 | await commands[0].waitUntilSegmentGeneration({ videoUUID: liveVideoReplayId, resolution: 0, segment: 2 }) | 570 | await commands[0].waitUntilSegmentGeneration({ videoUUID: liveVideoReplayId, resolution: 0, segment: 2 }) |
572 | 571 | ||
573 | await killallServers([ servers[0] ]) | 572 | await killallServers([ servers[0] ]) |
574 | await reRunServer(servers[0]) | 573 | await servers[0].run() |
575 | 574 | ||
576 | await wait(5000) | 575 | await wait(5000) |
577 | }) | 576 | }) |