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/search | |
parent | 9cc8d43e37a61709e7275c2a799bdf976dd940ca (diff) | |
download | PeerTube-210feb6cc484a6c5c63c98f770de34e223f944cb.tar.gz PeerTube-210feb6cc484a6c5c63c98f770de34e223f944cb.tar.zst PeerTube-210feb6cc484a6c5c63c98f770de34e223f944cb.zip |
Cleanup tests
Diffstat (limited to 'server/tests/api/search')
-rw-r--r-- | server/tests/api/search/search-activitypub-video-channels.ts | 9 | ||||
-rw-r--r-- | server/tests/api/search/search-activitypub-videos.ts | 9 | ||||
-rw-r--r-- | server/tests/api/search/search-videos.ts | 13 |
3 files changed, 5 insertions, 26 deletions
diff --git a/server/tests/api/search/search-activitypub-video-channels.ts b/server/tests/api/search/search-activitypub-video-channels.ts index 1f59a951b..c5662f049 100644 --- a/server/tests/api/search/search-activitypub-video-channels.ts +++ b/server/tests/api/search/search-activitypub-video-channels.ts | |||
@@ -33,8 +33,6 @@ describe('Test a ActivityPub video channels search', function () { | |||
33 | before(async function () { | 33 | before(async function () { |
34 | this.timeout(120000) | 34 | this.timeout(120000) |
35 | 35 | ||
36 | await flushTests() | ||
37 | |||
38 | servers = await flushAndRunMultipleServers(2) | 36 | servers = await flushAndRunMultipleServers(2) |
39 | 37 | ||
40 | await setAccessTokensToServers(servers) | 38 | await setAccessTokensToServers(servers) |
@@ -207,12 +205,7 @@ describe('Test a ActivityPub video channels search', function () { | |||
207 | expect(res.body.data).to.have.lengthOf(0) | 205 | expect(res.body.data).to.have.lengthOf(0) |
208 | }) | 206 | }) |
209 | 207 | ||
210 | after(async function () { | 208 | after(function () { |
211 | killallServers(servers) | 209 | killallServers(servers) |
212 | |||
213 | // Keep the logs if the test failed | ||
214 | if (this['ok']) { | ||
215 | await flushTests() | ||
216 | } | ||
217 | }) | 210 | }) |
218 | }) | 211 | }) |
diff --git a/server/tests/api/search/search-activitypub-videos.ts b/server/tests/api/search/search-activitypub-videos.ts index d984c696c..5c2a44ad5 100644 --- a/server/tests/api/search/search-activitypub-videos.ts +++ b/server/tests/api/search/search-activitypub-videos.ts | |||
@@ -30,8 +30,6 @@ describe('Test a ActivityPub videos search', function () { | |||
30 | before(async function () { | 30 | before(async function () { |
31 | this.timeout(120000) | 31 | this.timeout(120000) |
32 | 32 | ||
33 | await flushTests() | ||
34 | |||
35 | servers = await flushAndRunMultipleServers(2) | 33 | servers = await flushAndRunMultipleServers(2) |
36 | 34 | ||
37 | await setAccessTokensToServers(servers) | 35 | await setAccessTokensToServers(servers) |
@@ -151,12 +149,7 @@ describe('Test a ActivityPub videos search', function () { | |||
151 | expect(res.body.data).to.have.lengthOf(0) | 149 | expect(res.body.data).to.have.lengthOf(0) |
152 | }) | 150 | }) |
153 | 151 | ||
154 | after(async function () { | 152 | after(function () { |
155 | killallServers(servers) | 153 | killallServers(servers) |
156 | |||
157 | // Keep the logs if the test failed | ||
158 | if (this['ok']) { | ||
159 | await flushTests() | ||
160 | } | ||
161 | }) | 154 | }) |
162 | }) | 155 | }) |
diff --git a/server/tests/api/search/search-videos.ts b/server/tests/api/search/search-videos.ts index 65f3c9186..d1520a9aa 100644 --- a/server/tests/api/search/search-videos.ts +++ b/server/tests/api/search/search-videos.ts | |||
@@ -6,7 +6,7 @@ import { | |||
6 | advancedVideosSearch, | 6 | advancedVideosSearch, |
7 | flushTests, | 7 | flushTests, |
8 | killallServers, | 8 | killallServers, |
9 | runServer, | 9 | flushAndRunServer, |
10 | searchVideo, | 10 | searchVideo, |
11 | ServerInfo, | 11 | ServerInfo, |
12 | setAccessTokensToServers, | 12 | setAccessTokensToServers, |
@@ -24,9 +24,7 @@ describe('Test a videos search', function () { | |||
24 | before(async function () { | 24 | before(async function () { |
25 | this.timeout(30000) | 25 | this.timeout(30000) |
26 | 26 | ||
27 | await flushTests() | 27 | server = await flushAndRunServer(1) |
28 | |||
29 | server = await runServer(1) | ||
30 | 28 | ||
31 | await setAccessTokensToServers([ server ]) | 29 | await setAccessTokensToServers([ server ]) |
32 | 30 | ||
@@ -407,12 +405,7 @@ describe('Test a videos search', function () { | |||
407 | } | 405 | } |
408 | }) | 406 | }) |
409 | 407 | ||
410 | after(async function () { | 408 | after(function () { |
411 | killallServers([ server ]) | 409 | killallServers([ server ]) |
412 | |||
413 | // Keep the logs if the test failed | ||
414 | if (this['ok']) { | ||
415 | await flushTests() | ||
416 | } | ||
417 | }) | 410 | }) |
418 | }) | 411 | }) |