aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-24 15:10:37 +0200
committerChocobozzz <me@florianbigard.com>2019-04-24 16:26:25 +0200
commit7c3b79768bd174b22154e8d2df0b1211e01ee56a (patch)
tree9e45c9302083f0438f7ea174f5fb7d6042be5712 /server/tests/api/videos
parent913b1d71e630d5a959c763bf565a171b4dc61434 (diff)
downloadPeerTube-7c3b79768bd174b22154e8d2df0b1211e01ee56a.tar.gz
PeerTube-7c3b79768bd174b22154e8d2df0b1211e01ee56a.tar.zst
PeerTube-7c3b79768bd174b22154e8d2df0b1211e01ee56a.zip
Use test wrapper exit function
Diffstat (limited to 'server/tests/api/videos')
-rw-r--r--server/tests/api/videos/multiple-servers.ts6
-rw-r--r--server/tests/api/videos/services.ts16
-rw-r--r--server/tests/api/videos/single-server.ts9
-rw-r--r--server/tests/api/videos/video-abuse.ts5
-rw-r--r--server/tests/api/videos/video-blacklist.ts6
-rw-r--r--server/tests/api/videos/video-captions.ts6
-rw-r--r--server/tests/api/videos/video-change-ownership.ts6
-rw-r--r--server/tests/api/videos/video-channels.ts5
-rw-r--r--server/tests/api/videos/video-comments.ts8
-rw-r--r--server/tests/api/videos/video-description.ts5
-rw-r--r--server/tests/api/videos/video-hls.ts6
-rw-r--r--server/tests/api/videos/video-imports.ts5
-rw-r--r--server/tests/api/videos/video-nsfw.ts15
-rw-r--r--server/tests/api/videos/video-playlists.ts6
-rw-r--r--server/tests/api/videos/video-privacy.ts5
-rw-r--r--server/tests/api/videos/video-schedule-update.ts5
-rw-r--r--server/tests/api/videos/video-transcoder.ts6
-rw-r--r--server/tests/api/videos/videos-filter.ts5
-rw-r--r--server/tests/api/videos/videos-history.ts11
-rw-r--r--server/tests/api/videos/videos-overview.ts6
-rw-r--r--server/tests/api/videos/videos-views-cleaner.ts6
21 files changed, 69 insertions, 79 deletions
diff --git a/server/tests/api/videos/multiple-servers.ts b/server/tests/api/videos/multiple-servers.ts
index 50b231555..68c1e9a8d 100644
--- a/server/tests/api/videos/multiple-servers.ts
+++ b/server/tests/api/videos/multiple-servers.ts
@@ -9,7 +9,7 @@ import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/
9import { 9import {
10 addVideoChannel, 10 addVideoChannel,
11 checkTmpIsEmpty, 11 checkTmpIsEmpty,
12 checkVideoFilesWereRemoved, 12 checkVideoFilesWereRemoved, cleanupTests,
13 completeVideoCheck, 13 completeVideoCheck,
14 createUser, 14 createUser,
15 dateIsValid, 15 dateIsValid,
@@ -1029,7 +1029,7 @@ describe('Test multiple servers', function () {
1029 }) 1029 })
1030 }) 1030 })
1031 1031
1032 after(function () { 1032 after(async function () {
1033 killallServers(servers) 1033 await cleanupTests(servers)
1034 }) 1034 })
1035}) 1035})
diff --git a/server/tests/api/videos/services.ts b/server/tests/api/videos/services.ts
index 1397347d1..e9ad947b2 100644
--- a/server/tests/api/videos/services.ts
+++ b/server/tests/api/videos/services.ts
@@ -2,16 +2,8 @@
2 2
3import * as chai from 'chai' 3import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { 5import { getOEmbed, getVideosList, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../../../shared/extra-utils/index'
6 flushTests, 6import { cleanupTests, flushAndRunServer } from '../../../../shared/extra-utils/server/servers'
7 getOEmbed,
8 getVideosList,
9 killallServers,
10 ServerInfo,
11 setAccessTokensToServers,
12 uploadVideo
13} from '../../../../shared/extra-utils/index'
14import { flushAndRunServer } from '../../../../shared/extra-utils/server/servers'
15 7
16const expect = chai.expect 8const expect = chai.expect
17 9
@@ -74,7 +66,7 @@ describe('Test services', function () {
74 expect(res.body).to.not.have.property('thumbnail_height') 66 expect(res.body).to.not.have.property('thumbnail_height')
75 }) 67 })
76 68
77 after(function () { 69 after(async function () {
78 killallServers([ server ]) 70 await cleanupTests([ server ])
79 }) 71 })
80}) 72})
diff --git a/server/tests/api/videos/single-server.ts b/server/tests/api/videos/single-server.ts
index db2a3779f..1f366b642 100644
--- a/server/tests/api/videos/single-server.ts
+++ b/server/tests/api/videos/single-server.ts
@@ -6,8 +6,9 @@ import 'mocha'
6import { VideoPrivacy } from '../../../../shared/models/videos' 6import { VideoPrivacy } from '../../../../shared/models/videos'
7import { 7import {
8 checkVideoFilesWereRemoved, 8 checkVideoFilesWereRemoved,
9 cleanupTests,
9 completeVideoCheck, 10 completeVideoCheck,
10 flushTests, 11 flushAndRunServer,
11 getVideo, 12 getVideo,
12 getVideoCategories, 13 getVideoCategories,
13 getVideoLanguages, 14 getVideoLanguages,
@@ -17,10 +18,8 @@ import {
17 getVideosListPagination, 18 getVideosListPagination,
18 getVideosListSort, 19 getVideosListSort,
19 getVideosWithFilters, 20 getVideosWithFilters,
20 killallServers,
21 rateVideo, 21 rateVideo,
22 removeVideo, 22 removeVideo,
23 flushAndRunServer,
24 ServerInfo, 23 ServerInfo,
25 setAccessTokensToServers, 24 setAccessTokensToServers,
26 testImage, 25 testImage,
@@ -424,7 +423,7 @@ describe('Test a single server', function () {
424 expect(video.dislikes).to.equal(1) 423 expect(video.dislikes).to.equal(1)
425 }) 424 })
426 425
427 after(function () { 426 after(async function () {
428 killallServers([ server ]) 427 await cleanupTests([ server ])
429 }) 428 })
430}) 429})
diff --git a/server/tests/api/videos/video-abuse.ts b/server/tests/api/videos/video-abuse.ts
index 06bb31348..7318497d5 100644
--- a/server/tests/api/videos/video-abuse.ts
+++ b/server/tests/api/videos/video-abuse.ts
@@ -4,6 +4,7 @@ import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { VideoAbuse, VideoAbuseState } from '../../../../shared/models/videos' 5import { VideoAbuse, VideoAbuseState } from '../../../../shared/models/videos'
6import { 6import {
7 cleanupTests,
7 deleteVideoAbuse, 8 deleteVideoAbuse,
8 flushAndRunMultipleServers, 9 flushAndRunMultipleServers,
9 getVideoAbusesList, 10 getVideoAbusesList,
@@ -172,7 +173,7 @@ describe('Test video abuses', function () {
172 expect(res.body.data.length).to.equal(0) 173 expect(res.body.data.length).to.equal(0)
173 }) 174 })
174 175
175 after(function () { 176 after(async function () {
176 killallServers(servers) 177 await cleanupTests(servers)
177 }) 178 })
178}) 179})
diff --git a/server/tests/api/videos/video-blacklist.ts b/server/tests/api/videos/video-blacklist.ts
index cb15d1a52..e907bbdc0 100644
--- a/server/tests/api/videos/video-blacklist.ts
+++ b/server/tests/api/videos/video-blacklist.ts
@@ -4,7 +4,7 @@ import * as chai from 'chai'
4import { orderBy } from 'lodash' 4import { orderBy } from 'lodash'
5import 'mocha' 5import 'mocha'
6import { 6import {
7 addVideoToBlacklist, 7 addVideoToBlacklist, cleanupTests,
8 createUser, 8 createUser,
9 flushAndRunMultipleServers, 9 flushAndRunMultipleServers,
10 getBlacklistedVideosList, 10 getBlacklistedVideosList,
@@ -425,7 +425,7 @@ describe('Test video blacklist', function () {
425 }) 425 })
426 }) 426 })
427 427
428 after(function () { 428 after(async function () {
429 killallServers(servers) 429 await cleanupTests(servers)
430 }) 430 })
431}) 431})
diff --git a/server/tests/api/videos/video-captions.ts b/server/tests/api/videos/video-captions.ts
index c6f59762a..5e13f5949 100644
--- a/server/tests/api/videos/video-captions.ts
+++ b/server/tests/api/videos/video-captions.ts
@@ -3,7 +3,7 @@
3import * as chai from 'chai' 3import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { 5import {
6 checkVideoFilesWereRemoved, 6 checkVideoFilesWereRemoved, cleanupTests,
7 doubleFollow, 7 doubleFollow,
8 flushAndRunMultipleServers, 8 flushAndRunMultipleServers,
9 removeVideo, 9 removeVideo,
@@ -195,7 +195,7 @@ describe('Test video captions', function () {
195 await checkVideoFilesWereRemoved(videoUUID, 1) 195 await checkVideoFilesWereRemoved(videoUUID, 1)
196 }) 196 })
197 197
198 after(function () { 198 after(async function () {
199 killallServers(servers) 199 await cleanupTests(servers)
200 }) 200 })
201}) 201})
diff --git a/server/tests/api/videos/video-change-ownership.ts b/server/tests/api/videos/video-change-ownership.ts
index db1220677..1c0327d40 100644
--- a/server/tests/api/videos/video-change-ownership.ts
+++ b/server/tests/api/videos/video-change-ownership.ts
@@ -4,7 +4,7 @@ import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { 5import {
6 acceptChangeOwnership, 6 acceptChangeOwnership,
7 changeVideoOwnership, 7 changeVideoOwnership, cleanupTests,
8 createUser, 8 createUser,
9 doubleFollow, 9 doubleFollow,
10 flushAndRunMultipleServers, 10 flushAndRunMultipleServers,
@@ -297,7 +297,7 @@ describe('Test video change ownership - quota too small', function () {
297 await acceptChangeOwnership(server.url, secondUserAccessToken, lastRequestChangeOwnershipId, channelId, 403) 297 await acceptChangeOwnership(server.url, secondUserAccessToken, lastRequestChangeOwnershipId, channelId, 403)
298 }) 298 })
299 299
300 after(function () { 300 after(async function () {
301 killallServers([server]) 301 await cleanupTests([ server ])
302 }) 302 })
303}) 303})
diff --git a/server/tests/api/videos/video-channels.ts b/server/tests/api/videos/video-channels.ts
index 60b84e443..345e96f43 100644
--- a/server/tests/api/videos/video-channels.ts
+++ b/server/tests/api/videos/video-channels.ts
@@ -4,6 +4,7 @@ import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { User, Video } from '../../../../shared/index' 5import { User, Video } from '../../../../shared/index'
6import { 6import {
7 cleanupTests,
7 createUser, 8 createUser,
8 doubleFollow, 9 doubleFollow,
9 flushAndRunMultipleServers, 10 flushAndRunMultipleServers,
@@ -277,7 +278,7 @@ describe('Test video channels', function () {
277 } 278 }
278 }) 279 })
279 280
280 after(function () { 281 after(async function () {
281 killallServers(servers) 282 await cleanupTests(servers)
282 }) 283 })
283}) 284})
diff --git a/server/tests/api/videos/video-comments.ts b/server/tests/api/videos/video-comments.ts
index 50224ee47..22fd8c058 100644
--- a/server/tests/api/videos/video-comments.ts
+++ b/server/tests/api/videos/video-comments.ts
@@ -3,11 +3,9 @@
3import * as chai from 'chai' 3import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model' 5import { VideoComment, VideoCommentThreadTree } from '../../../../shared/models/videos/video-comment.model'
6import { testImage } from '../../../../shared/extra-utils' 6import { cleanupTests, testImage } from '../../../../shared/extra-utils'
7import { 7import {
8 dateIsValid, 8 dateIsValid,
9 flushTests,
10 killallServers,
11 flushAndRunServer, 9 flushAndRunServer,
12 ServerInfo, 10 ServerInfo,
13 setAccessTokensToServers, 11 setAccessTokensToServers,
@@ -199,7 +197,7 @@ describe('Test video comments', function () {
199 expect(res.body.data[1].totalReplies).to.equal(0) 197 expect(res.body.data[1].totalReplies).to.equal(0)
200 }) 198 })
201 199
202 after(function () { 200 after(async function () {
203 killallServers([ server ]) 201 await cleanupTests([ server ])
204 }) 202 })
205}) 203})
diff --git a/server/tests/api/videos/video-description.ts b/server/tests/api/videos/video-description.ts
index 333d539f4..db4d278bf 100644
--- a/server/tests/api/videos/video-description.ts
+++ b/server/tests/api/videos/video-description.ts
@@ -3,6 +3,7 @@
3import * as chai from 'chai' 3import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { 5import {
6 cleanupTests,
6 flushAndRunMultipleServers, 7 flushAndRunMultipleServers,
7 getVideo, 8 getVideo,
8 getVideoDescription, 9 getVideoDescription,
@@ -99,7 +100,7 @@ describe('Test video description', function () {
99 } 100 }
100 }) 101 })
101 102
102 after(function () { 103 after(async function () {
103 killallServers(servers) 104 await cleanupTests(servers)
104 }) 105 })
105}) 106})
diff --git a/server/tests/api/videos/video-hls.ts b/server/tests/api/videos/video-hls.ts
index 0ac84a656..22031c18b 100644
--- a/server/tests/api/videos/video-hls.ts
+++ b/server/tests/api/videos/video-hls.ts
@@ -5,7 +5,7 @@ import 'mocha'
5import { 5import {
6 checkDirectoryIsEmpty, 6 checkDirectoryIsEmpty,
7 checkSegmentHash, 7 checkSegmentHash,
8 checkTmpIsEmpty, 8 checkTmpIsEmpty, cleanupTests,
9 doubleFollow, 9 doubleFollow,
10 flushAndRunMultipleServers, 10 flushAndRunMultipleServers,
11 flushTests, 11 flushTests,
@@ -128,7 +128,7 @@ describe('Test HLS videos', function () {
128 } 128 }
129 }) 129 })
130 130
131 after(function () { 131 after(async function () {
132 killallServers(servers) 132 await cleanupTests(servers)
133 }) 133 })
134}) 134})
diff --git a/server/tests/api/videos/video-imports.ts b/server/tests/api/videos/video-imports.ts
index 49a28e207..1233ed6eb 100644
--- a/server/tests/api/videos/video-imports.ts
+++ b/server/tests/api/videos/video-imports.ts
@@ -4,6 +4,7 @@ import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { VideoDetails, VideoImport, VideoPrivacy } from '../../../../shared/models/videos' 5import { VideoDetails, VideoImport, VideoPrivacy } from '../../../../shared/models/videos'
6import { 6import {
7 cleanupTests,
7 doubleFollow, 8 doubleFollow,
8 flushAndRunMultipleServers, 9 flushAndRunMultipleServers,
9 getMyUserInformation, 10 getMyUserInformation,
@@ -241,7 +242,7 @@ describe('Test video imports', function () {
241 } 242 }
242 }) 243 })
243 244
244 after(function () { 245 after(async function () {
245 killallServers(servers) 246 await cleanupTests(servers)
246 }) 247 })
247}) 248})
diff --git a/server/tests/api/videos/video-nsfw.ts b/server/tests/api/videos/video-nsfw.ts
index 811705212..ad6a4b43f 100644
--- a/server/tests/api/videos/video-nsfw.ts
+++ b/server/tests/api/videos/video-nsfw.ts
@@ -2,25 +2,18 @@
2 2
3import * as chai from 'chai' 3import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { 5import { cleanupTests, getVideosList, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../../../shared/extra-utils/index'
6 flushTests,
7 getVideosList,
8 killallServers,
9 ServerInfo,
10 setAccessTokensToServers,
11 uploadVideo
12} from '../../../../shared/extra-utils/index'
13import { userLogin } from '../../../../shared/extra-utils/users/login' 6import { userLogin } from '../../../../shared/extra-utils/users/login'
14import { createUser } from '../../../../shared/extra-utils/users/users' 7import { createUser } from '../../../../shared/extra-utils/users/users'
15import { getMyVideos } from '../../../../shared/extra-utils/videos/videos' 8import { getMyVideos } from '../../../../shared/extra-utils/videos/videos'
16import { 9import {
10 flushAndRunServer,
17 getAccountVideos, 11 getAccountVideos,
18 getConfig, 12 getConfig,
19 getCustomConfig, 13 getCustomConfig,
20 getMyUserInformation, 14 getMyUserInformation,
21 getVideoChannelVideos, 15 getVideoChannelVideos,
22 getVideosListWithToken, 16 getVideosListWithToken,
23 flushAndRunServer,
24 searchVideo, 17 searchVideo,
25 searchVideoWithToken, 18 searchVideoWithToken,
26 updateCustomConfig, 19 updateCustomConfig,
@@ -241,7 +234,7 @@ describe('Test video NSFW policy', function () {
241 }) 234 })
242 }) 235 })
243 236
244 after(function () { 237 after(async function () {
245 killallServers([ server ]) 238 await cleanupTests([ server ])
246 }) 239 })
247}) 240})
diff --git a/server/tests/api/videos/video-playlists.ts b/server/tests/api/videos/video-playlists.ts
index ea349f09b..928568299 100644
--- a/server/tests/api/videos/video-playlists.ts
+++ b/server/tests/api/videos/video-playlists.ts
@@ -5,7 +5,7 @@ import 'mocha'
5import { 5import {
6 addVideoChannel, 6 addVideoChannel,
7 addVideoInPlaylist, 7 addVideoInPlaylist,
8 checkPlaylistFilesWereRemoved, 8 checkPlaylistFilesWereRemoved, cleanupTests,
9 createUser, 9 createUser,
10 createVideoPlaylist, 10 createVideoPlaylist,
11 deleteVideoChannel, 11 deleteVideoChannel,
@@ -860,7 +860,7 @@ describe('Test video playlists', function () {
860 } 860 }
861 }) 861 })
862 862
863 after(function () { 863 after(async function () {
864 killallServers(servers) 864 await cleanupTests(servers)
865 }) 865 })
866}) 866})
diff --git a/server/tests/api/videos/video-privacy.ts b/server/tests/api/videos/video-privacy.ts
index a823993b2..ef1cf0f07 100644
--- a/server/tests/api/videos/video-privacy.ts
+++ b/server/tests/api/videos/video-privacy.ts
@@ -4,6 +4,7 @@ import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { VideoPrivacy } from '../../../../shared/models/videos/video-privacy.enum' 5import { VideoPrivacy } from '../../../../shared/models/videos/video-privacy.enum'
6import { 6import {
7 cleanupTests,
7 flushAndRunMultipleServers, 8 flushAndRunMultipleServers,
8 getVideosList, 9 getVideosList,
9 killallServers, 10 killallServers,
@@ -152,7 +153,7 @@ describe('Test video privacy', function () {
152 } 153 }
153 }) 154 })
154 155
155 after(function () { 156 after(async function () {
156 killallServers(servers) 157 await cleanupTests(servers)
157 }) 158 })
158}) 159})
diff --git a/server/tests/api/videos/video-schedule-update.ts b/server/tests/api/videos/video-schedule-update.ts
index d7301a137..64f657780 100644
--- a/server/tests/api/videos/video-schedule-update.ts
+++ b/server/tests/api/videos/video-schedule-update.ts
@@ -4,6 +4,7 @@ import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { VideoPrivacy } from '../../../../shared/models/videos' 5import { VideoPrivacy } from '../../../../shared/models/videos'
6import { 6import {
7 cleanupTests,
7 doubleFollow, 8 doubleFollow,
8 flushAndRunMultipleServers, 9 flushAndRunMultipleServers,
9 getMyVideos, 10 getMyVideos,
@@ -165,7 +166,7 @@ describe('Test video update scheduler', function () {
165 } 166 }
166 }) 167 })
167 168
168 after(function () { 169 after(async function () {
169 killallServers(servers) 170 await cleanupTests(servers)
170 }) 171 })
171}) 172})
diff --git a/server/tests/api/videos/video-transcoder.ts b/server/tests/api/videos/video-transcoder.ts
index 92888f137..3cd43e99b 100644
--- a/server/tests/api/videos/video-transcoder.ts
+++ b/server/tests/api/videos/video-transcoder.ts
@@ -6,7 +6,7 @@ import { omit } from 'lodash'
6import { getMaxBitrate, VideoDetails, VideoResolution, VideoState } from '../../../../shared/models/videos' 6import { getMaxBitrate, VideoDetails, VideoResolution, VideoState } from '../../../../shared/models/videos'
7import { audio, getVideoFileBitrate, getVideoFileFPS, getVideoFileResolution } from '../../../helpers/ffmpeg-utils' 7import { audio, getVideoFileBitrate, getVideoFileFPS, getVideoFileResolution } from '../../../helpers/ffmpeg-utils'
8import { 8import {
9 buildAbsoluteFixturePath, 9 buildAbsoluteFixturePath, cleanupTests,
10 doubleFollow, 10 doubleFollow,
11 flushAndRunMultipleServers, 11 flushAndRunMultipleServers,
12 generateHighBitrateVideo, 12 generateHighBitrateVideo,
@@ -349,7 +349,7 @@ describe('Test video transcoding', function () {
349 } 349 }
350 }) 350 })
351 351
352 after(function () { 352 after(async function () {
353 killallServers(servers) 353 await cleanupTests(servers)
354 }) 354 })
355}) 355})
diff --git a/server/tests/api/videos/videos-filter.ts b/server/tests/api/videos/videos-filter.ts
index 179610595..e1e65260f 100644
--- a/server/tests/api/videos/videos-filter.ts
+++ b/server/tests/api/videos/videos-filter.ts
@@ -3,6 +3,7 @@
3import * as chai from 'chai' 3import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { 5import {
6 cleanupTests,
6 createUser, 7 createUser,
7 doubleFollow, 8 doubleFollow,
8 flushAndRunMultipleServers, 9 flushAndRunMultipleServers,
@@ -119,7 +120,7 @@ describe('Test videos filter validator', function () {
119 }) 120 })
120 }) 121 })
121 122
122 after(function () { 123 after(async function () {
123 killallServers(servers) 124 await cleanupTests(servers)
124 }) 125 })
125}) 126})
diff --git a/server/tests/api/videos/videos-history.ts b/server/tests/api/videos/videos-history.ts
index 2a904c659..c7e55c1ab 100644
--- a/server/tests/api/videos/videos-history.ts
+++ b/server/tests/api/videos/videos-history.ts
@@ -3,12 +3,13 @@
3import * as chai from 'chai' 3import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { 5import {
6 cleanupTests,
6 createUser, 7 createUser,
7 flushTests, 8 flushAndRunServer,
8 getVideosListWithToken, 9 getVideosListWithToken,
9 getVideoWithToken, 10 getVideoWithToken,
10 killallServers, reRunServer, 11 killallServers,
11 flushAndRunServer, 12 reRunServer,
12 searchVideoWithToken, 13 searchVideoWithToken,
13 ServerInfo, 14 ServerInfo,
14 setAccessTokensToServers, 15 setAccessTokensToServers,
@@ -220,7 +221,7 @@ describe('Test videos history', function () {
220 expect(res.body.total).to.equal(0) 221 expect(res.body.total).to.equal(0)
221 }) 222 })
222 223
223 after(function () { 224 after(async function () {
224 killallServers([ server ]) 225 await cleanupTests([ server ])
225 }) 226 })
226}) 227})
diff --git a/server/tests/api/videos/videos-overview.ts b/server/tests/api/videos/videos-overview.ts
index c63725d71..975a5c87a 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 { flushAndRunServer, killallServers, ServerInfo, setAccessTokensToServers, uploadVideo } from '../../../../shared/extra-utils' 5import { cleanupTests, 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
@@ -87,7 +87,7 @@ describe('Test a videos overview', function () {
87 expect(overview.channels[0].channel.name).to.equal('root_channel') 87 expect(overview.channels[0].channel.name).to.equal('root_channel')
88 }) 88 })
89 89
90 after(function () { 90 after(async function () {
91 killallServers([ server ]) 91 await cleanupTests([ server ])
92 }) 92 })
93}) 93})
diff --git a/server/tests/api/videos/videos-views-cleaner.ts b/server/tests/api/videos/videos-views-cleaner.ts
index 80cecdd23..c21d46d56 100644
--- a/server/tests/api/videos/videos-views-cleaner.ts
+++ b/server/tests/api/videos/videos-views-cleaner.ts
@@ -10,7 +10,7 @@ import {
10 flushAndRunServer, 10 flushAndRunServer,
11 ServerInfo, 11 ServerInfo,
12 setAccessTokensToServers, 12 setAccessTokensToServers,
13 uploadVideo, uploadVideoAndGetId, viewVideo, wait, countVideoViewsOf, doubleFollow, waitJobs 13 uploadVideo, uploadVideoAndGetId, viewVideo, wait, countVideoViewsOf, doubleFollow, waitJobs, cleanupTests
14} from '../../../../shared/extra-utils' 14} from '../../../../shared/extra-utils'
15import { getVideosOverview } from '../../../../shared/extra-utils/overviews/overviews' 15import { getVideosOverview } from '../../../../shared/extra-utils/overviews/overviews'
16import { VideosOverview } from '../../../../shared/models/overviews' 16import { VideosOverview } from '../../../../shared/models/overviews'
@@ -100,7 +100,7 @@ describe('Test video views cleaner', function () {
100 } 100 }
101 }) 101 })
102 102
103 after(function () { 103 after(async function () {
104 killallServers(servers) 104 await cleanupTests(servers)
105 }) 105 })
106}) 106})