diff options
author | Chocobozzz <me@florianbigard.com> | 2019-04-24 10:53:40 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-04-24 16:26:23 +0200 |
commit | 210feb6cc484a6c5c63c98f770de34e223f944cb (patch) | |
tree | d1d841892a7ac87ac0d434194597606a375aaed1 /server/tests/api/videos/videos-overview.ts | |
parent | 9cc8d43e37a61709e7275c2a799bdf976dd940ca (diff) | |
download | PeerTube-210feb6cc484a6c5c63c98f770de34e223f944cb.tar.gz PeerTube-210feb6cc484a6c5c63c98f770de34e223f944cb.tar.zst PeerTube-210feb6cc484a6c5c63c98f770de34e223f944cb.zip |
Cleanup tests
Diffstat (limited to 'server/tests/api/videos/videos-overview.ts')
-rw-r--r-- | server/tests/api/videos/videos-overview.ts | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/server/tests/api/videos/videos-overview.ts b/server/tests/api/videos/videos-overview.ts index 233ca8a5d..c921eb74d 100644 --- a/server/tests/api/videos/videos-overview.ts +++ b/server/tests/api/videos/videos-overview.ts | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | import * as chai from 'chai' | 3 | import * as chai from 'chai' |
4 | import 'mocha' | 4 | import 'mocha' |
5 | import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../../../shared/extra-utils' | 5 | import { flushTests, killallServers, flushAndRunServer, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../../../shared/extra-utils' |
6 | import { getVideosOverview } from '../../../../shared/extra-utils/overviews/overviews' | 6 | import { getVideosOverview } from '../../../../shared/extra-utils/overviews/overviews' |
7 | import { VideosOverview } from '../../../../shared/models/overviews' | 7 | import { VideosOverview } from '../../../../shared/models/overviews' |
8 | 8 | ||
@@ -14,9 +14,7 @@ describe('Test a videos overview', function () { | |||
14 | before(async function () { | 14 | before(async function () { |
15 | this.timeout(30000) | 15 | this.timeout(30000) |
16 | 16 | ||
17 | await flushTests() | 17 | server = await flushAndRunServer(1) |
18 | |||
19 | server = await runServer(1) | ||
20 | 18 | ||
21 | await setAccessTokensToServers([ server ]) | 19 | await setAccessTokensToServers([ server ]) |
22 | }) | 20 | }) |
@@ -89,12 +87,7 @@ describe('Test a videos overview', function () { | |||
89 | expect(overview.channels[0].channel.name).to.equal('root_channel') | 87 | expect(overview.channels[0].channel.name).to.equal('root_channel') |
90 | }) | 88 | }) |
91 | 89 | ||
92 | after(async function () { | 90 | after(function () { |
93 | killallServers([ server ]) | 91 | killallServers([ server ]) |
94 | |||
95 | // Keep the logs if the test failed | ||
96 | if (this['ok']) { | ||
97 | await flushTests() | ||
98 | } | ||
99 | }) | 92 | }) |
100 | }) | 93 | }) |