diff options
Diffstat (limited to 'server/tests/cli/update-host.ts')
-rw-r--r-- | server/tests/cli/update-host.ts | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/server/tests/cli/update-host.ts b/server/tests/cli/update-host.ts index ad56f7b1b..d0c6d2042 100644 --- a/server/tests/cli/update-host.ts +++ b/server/tests/cli/update-host.ts | |||
@@ -3,22 +3,22 @@ | |||
3 | import 'mocha' | 3 | import 'mocha' |
4 | import * as chai from 'chai' | 4 | import * as chai from 'chai' |
5 | import { VideoDetails } from '../../../shared/models/videos' | 5 | import { VideoDetails } from '../../../shared/models/videos' |
6 | const expect = chai.expect | ||
7 | |||
8 | import { | 6 | import { |
9 | execCLI, | 7 | execCLI, |
10 | flushTests, | 8 | flushTests, |
11 | getEnvCli, | 9 | getEnvCli, |
10 | getVideo, | ||
12 | getVideosList, | 11 | getVideosList, |
13 | killallServers, | 12 | killallServers, |
14 | parseTorrentVideo, | 13 | parseTorrentVideo, |
15 | runServer, | 14 | runServer, |
16 | ServerInfo, | 15 | ServerInfo, |
17 | setAccessTokensToServers, | 16 | setAccessTokensToServers, |
18 | uploadVideo, | 17 | uploadVideo |
19 | wait, | ||
20 | getVideo | ||
21 | } from '../utils' | 18 | } from '../utils' |
19 | import { waitJobs } from '../utils/server/jobs' | ||
20 | |||
21 | const expect = chai.expect | ||
22 | 22 | ||
23 | describe('Test update host scripts', function () { | 23 | describe('Test update host scripts', function () { |
24 | let server: ServerInfo | 24 | let server: ServerInfo |
@@ -41,7 +41,8 @@ describe('Test update host scripts', function () { | |||
41 | const videoAttributes = {} | 41 | const videoAttributes = {} |
42 | await uploadVideo(server.url, server.accessToken, videoAttributes) | 42 | await uploadVideo(server.url, server.accessToken, videoAttributes) |
43 | await uploadVideo(server.url, server.accessToken, videoAttributes) | 43 | await uploadVideo(server.url, server.accessToken, videoAttributes) |
44 | await wait(30000) | 44 | |
45 | await waitJobs(server) | ||
45 | }) | 46 | }) |
46 | 47 | ||
47 | it('Should update torrent hosts', async function () { | 48 | it('Should update torrent hosts', async function () { |
@@ -82,10 +83,5 @@ describe('Test update host scripts', function () { | |||
82 | 83 | ||
83 | after(async function () { | 84 | after(async function () { |
84 | killallServers([ server ]) | 85 | killallServers([ server ]) |
85 | |||
86 | // Keep the logs if the test failed | ||
87 | if (this['ok']) { | ||
88 | await flushTests() | ||
89 | } | ||
90 | }) | 86 | }) |
91 | }) | 87 | }) |