aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos/videos-overview.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-24 10:53:40 +0200
committerChocobozzz <me@florianbigard.com>2019-04-24 16:26:23 +0200
commit210feb6cc484a6c5c63c98f770de34e223f944cb (patch)
treed1d841892a7ac87ac0d434194597606a375aaed1 /server/tests/api/videos/videos-overview.ts
parent9cc8d43e37a61709e7275c2a799bdf976dd940ca (diff)
downloadPeerTube-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.ts13
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
3import * as chai from 'chai' 3import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { flushTests, killallServers, runServer, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../../../shared/extra-utils' 5import { flushTests, killallServers, flushAndRunServer, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../../../shared/extra-utils'
6import { getVideosOverview } from '../../../../shared/extra-utils/overviews/overviews' 6import { getVideosOverview } from '../../../../shared/extra-utils/overviews/overviews'
7import { VideosOverview } from '../../../../shared/models/overviews' 7import { 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})