diff options
author | Chocobozzz <me@florianbigard.com> | 2019-04-24 15:10:37 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-04-24 16:26:25 +0200 |
commit | 7c3b79768bd174b22154e8d2df0b1211e01ee56a (patch) | |
tree | 9e45c9302083f0438f7ea174f5fb7d6042be5712 /server/tests/api/search | |
parent | 913b1d71e630d5a959c763bf565a171b4dc61434 (diff) | |
download | PeerTube-7c3b79768bd174b22154e8d2df0b1211e01ee56a.tar.gz PeerTube-7c3b79768bd174b22154e8d2df0b1211e01ee56a.tar.zst PeerTube-7c3b79768bd174b22154e8d2df0b1211e01ee56a.zip |
Use test wrapper exit function
Diffstat (limited to 'server/tests/api/search')
-rw-r--r-- | server/tests/api/search/search-activitypub-video-channels.ts | 6 | ||||
-rw-r--r-- | server/tests/api/search/search-activitypub-videos.ts | 6 | ||||
-rw-r--r-- | server/tests/api/search/search-videos.ts | 7 |
3 files changed, 10 insertions, 9 deletions
diff --git a/server/tests/api/search/search-activitypub-video-channels.ts b/server/tests/api/search/search-activitypub-video-channels.ts index c5662f049..4d1ceb767 100644 --- a/server/tests/api/search/search-activitypub-video-channels.ts +++ b/server/tests/api/search/search-activitypub-video-channels.ts | |||
@@ -3,7 +3,7 @@ | |||
3 | import * as chai from 'chai' | 3 | import * as chai from 'chai' |
4 | import 'mocha' | 4 | import 'mocha' |
5 | import { | 5 | import { |
6 | addVideoChannel, | 6 | addVideoChannel, cleanupTests, |
7 | createUser, | 7 | createUser, |
8 | deleteVideoChannel, | 8 | deleteVideoChannel, |
9 | flushAndRunMultipleServers, | 9 | flushAndRunMultipleServers, |
@@ -205,7 +205,7 @@ describe('Test a ActivityPub video channels search', function () { | |||
205 | expect(res.body.data).to.have.lengthOf(0) | 205 | expect(res.body.data).to.have.lengthOf(0) |
206 | }) | 206 | }) |
207 | 207 | ||
208 | after(function () { | 208 | after(async function () { |
209 | killallServers(servers) | 209 | await cleanupTests(servers) |
210 | }) | 210 | }) |
211 | }) | 211 | }) |
diff --git a/server/tests/api/search/search-activitypub-videos.ts b/server/tests/api/search/search-activitypub-videos.ts index 5c2a44ad5..e039961cb 100644 --- a/server/tests/api/search/search-activitypub-videos.ts +++ b/server/tests/api/search/search-activitypub-videos.ts | |||
@@ -15,7 +15,7 @@ import { | |||
15 | updateVideo, | 15 | updateVideo, |
16 | uploadVideo, | 16 | uploadVideo, |
17 | wait, | 17 | wait, |
18 | searchVideo | 18 | searchVideo, cleanupTests |
19 | } from '../../../../shared/extra-utils' | 19 | } from '../../../../shared/extra-utils' |
20 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' | 20 | import { waitJobs } from '../../../../shared/extra-utils/server/jobs' |
21 | import { Video, VideoPrivacy } from '../../../../shared/models/videos' | 21 | import { Video, VideoPrivacy } from '../../../../shared/models/videos' |
@@ -149,7 +149,7 @@ describe('Test a ActivityPub videos search', function () { | |||
149 | expect(res.body.data).to.have.lengthOf(0) | 149 | expect(res.body.data).to.have.lengthOf(0) |
150 | }) | 150 | }) |
151 | 151 | ||
152 | after(function () { | 152 | after(async function () { |
153 | killallServers(servers) | 153 | await cleanupTests(servers) |
154 | }) | 154 | }) |
155 | }) | 155 | }) |
diff --git a/server/tests/api/search/search-videos.ts b/server/tests/api/search/search-videos.ts index d1520a9aa..1a086b33a 100644 --- a/server/tests/api/search/search-videos.ts +++ b/server/tests/api/search/search-videos.ts | |||
@@ -12,7 +12,8 @@ import { | |||
12 | setAccessTokensToServers, | 12 | setAccessTokensToServers, |
13 | uploadVideo, | 13 | uploadVideo, |
14 | wait, | 14 | wait, |
15 | immutableAssign | 15 | immutableAssign, |
16 | cleanupTests | ||
16 | } from '../../../../shared/extra-utils' | 17 | } from '../../../../shared/extra-utils' |
17 | 18 | ||
18 | const expect = chai.expect | 19 | const expect = chai.expect |
@@ -405,7 +406,7 @@ describe('Test a videos search', function () { | |||
405 | } | 406 | } |
406 | }) | 407 | }) |
407 | 408 | ||
408 | after(function () { | 409 | after(async function () { |
409 | killallServers([ server ]) | 410 | await cleanupTests([ server ]) |
410 | }) | 411 | }) |
411 | }) | 412 | }) |