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/videos/videos-history.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/videos/videos-history.ts')
-rw-r--r-- | server/tests/api/videos/videos-history.ts | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/server/tests/api/videos/videos-history.ts b/server/tests/api/videos/videos-history.ts index 4b5e581d1..55e53cb94 100644 --- a/server/tests/api/videos/videos-history.ts +++ b/server/tests/api/videos/videos-history.ts | |||
@@ -5,11 +5,10 @@ import * as chai from 'chai' | |||
5 | import { HttpStatusCode } from '@shared/core-utils' | 5 | import { HttpStatusCode } from '@shared/core-utils' |
6 | import { | 6 | import { |
7 | cleanupTests, | 7 | cleanupTests, |
8 | flushAndRunServer, | 8 | createSingleServer, |
9 | HistoryCommand, | 9 | HistoryCommand, |
10 | killallServers, | 10 | killallServers, |
11 | reRunServer, | 11 | PeerTubeServer, |
12 | ServerInfo, | ||
13 | setAccessTokensToServers, | 12 | setAccessTokensToServers, |
14 | wait | 13 | wait |
15 | } from '@shared/extra-utils' | 14 | } from '@shared/extra-utils' |
@@ -18,7 +17,7 @@ import { Video } from '@shared/models' | |||
18 | const expect = chai.expect | 17 | const expect = chai.expect |
19 | 18 | ||
20 | describe('Test videos history', function () { | 19 | describe('Test videos history', function () { |
21 | let server: ServerInfo = null | 20 | let server: PeerTubeServer = null |
22 | let video1UUID: string | 21 | let video1UUID: string |
23 | let video2UUID: string | 22 | let video2UUID: string |
24 | let video3UUID: string | 23 | let video3UUID: string |
@@ -29,7 +28,7 @@ describe('Test videos history', function () { | |||
29 | before(async function () { | 28 | before(async function () { |
30 | this.timeout(30000) | 29 | this.timeout(30000) |
31 | 30 | ||
32 | server = await flushAndRunServer(1) | 31 | server = await createSingleServer(1) |
33 | 32 | ||
34 | await setAccessTokensToServers([ server ]) | 33 | await setAccessTokensToServers([ server ]) |
35 | 34 | ||
@@ -191,7 +190,7 @@ describe('Test videos history', function () { | |||
191 | 190 | ||
192 | await killallServers([ server ]) | 191 | await killallServers([ server ]) |
193 | 192 | ||
194 | await reRunServer(server, { history: { videos: { max_age: '10 days' } } }) | 193 | await server.run({ history: { videos: { max_age: '10 days' } } }) |
195 | 194 | ||
196 | await wait(6000) | 195 | await wait(6000) |
197 | 196 | ||
@@ -206,7 +205,7 @@ describe('Test videos history', function () { | |||
206 | 205 | ||
207 | await killallServers([ server ]) | 206 | await killallServers([ server ]) |
208 | 207 | ||
209 | await reRunServer(server, { history: { videos: { max_age: '5 seconds' } } }) | 208 | await server.run({ history: { videos: { max_age: '5 seconds' } } }) |
210 | 209 | ||
211 | await wait(6000) | 210 | await wait(6000) |
212 | 211 | ||