aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/users
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/users
parent913b1d71e630d5a959c763bf565a171b4dc61434 (diff)
downloadPeerTube-7c3b79768bd174b22154e8d2df0b1211e01ee56a.tar.gz
PeerTube-7c3b79768bd174b22154e8d2df0b1211e01ee56a.tar.zst
PeerTube-7c3b79768bd174b22154e8d2df0b1211e01ee56a.zip
Use test wrapper exit function
Diffstat (limited to 'server/tests/api/users')
-rw-r--r--server/tests/api/users/blocklist.ts5
-rw-r--r--server/tests/api/users/user-subscriptions.ts5
-rw-r--r--server/tests/api/users/users-multiple-servers.ts6
-rw-r--r--server/tests/api/users/users-verification.ts7
-rw-r--r--server/tests/api/users/users.ts9
5 files changed, 17 insertions, 15 deletions
diff --git a/server/tests/api/users/blocklist.ts b/server/tests/api/users/blocklist.ts
index 34eabf2e6..fbc57e0ef 100644
--- a/server/tests/api/users/blocklist.ts
+++ b/server/tests/api/users/blocklist.ts
@@ -4,6 +4,7 @@ import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { AccountBlock, ServerBlock, Video } from '../../../../shared/index' 5import { AccountBlock, ServerBlock, Video } from '../../../../shared/index'
6import { 6import {
7 cleanupTests,
7 createUser, 8 createUser,
8 doubleFollow, 9 doubleFollow,
9 flushAndRunMultipleServers, 10 flushAndRunMultipleServers,
@@ -498,7 +499,7 @@ describe('Test blocklist', function () {
498 }) 499 })
499 }) 500 })
500 501
501 after(function () { 502 after(async function () {
502 killallServers(servers) 503 await cleanupTests(servers)
503 }) 504 })
504}) 505})
diff --git a/server/tests/api/users/user-subscriptions.ts b/server/tests/api/users/user-subscriptions.ts
index ee5abd6b7..48811e647 100644
--- a/server/tests/api/users/user-subscriptions.ts
+++ b/server/tests/api/users/user-subscriptions.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,
@@ -368,7 +369,7 @@ describe('Test users subscriptions', function () {
368 } 369 }
369 }) 370 })
370 371
371 after(function () { 372 after(async function () {
372 killallServers(servers) 373 await cleanupTests(servers)
373 }) 374 })
374}) 375})
diff --git a/server/tests/api/users/users-multiple-servers.ts b/server/tests/api/users/users-multiple-servers.ts
index 7097d90d1..9a971adb3 100644
--- a/server/tests/api/users/users-multiple-servers.ts
+++ b/server/tests/api/users/users-multiple-servers.ts
@@ -5,7 +5,7 @@ import 'mocha'
5import { Account } from '../../../../shared/models/actors' 5import { Account } from '../../../../shared/models/actors'
6import { 6import {
7 checkTmpIsEmpty, 7 checkTmpIsEmpty,
8 checkVideoFilesWereRemoved, 8 checkVideoFilesWereRemoved, cleanupTests,
9 createUser, 9 createUser,
10 doubleFollow, 10 doubleFollow,
11 flushAndRunMultipleServers, 11 flushAndRunMultipleServers,
@@ -235,7 +235,7 @@ describe('Test users with multiple servers', function () {
235 } 235 }
236 }) 236 })
237 237
238 after(function () { 238 after(async function () {
239 killallServers(servers) 239 await cleanupTests(servers)
240 }) 240 })
241}) 241})
diff --git a/server/tests/api/users/users-verification.ts b/server/tests/api/users/users-verification.ts
index 295caae97..514acf2e7 100644
--- a/server/tests/api/users/users-verification.ts
+++ b/server/tests/api/users/users-verification.ts
@@ -4,7 +4,7 @@ import * as chai from 'chai'
4import 'mocha' 4import 'mocha'
5import { 5import {
6 registerUser, flushTests, getUserInformation, getMyUserInformation, killallServers, 6 registerUser, flushTests, getUserInformation, getMyUserInformation, killallServers,
7 userLogin, login, flushAndRunServer, ServerInfo, verifyEmail, updateCustomSubConfig, wait 7 userLogin, login, flushAndRunServer, ServerInfo, verifyEmail, updateCustomSubConfig, wait, cleanupTests
8} from '../../../../shared/extra-utils' 8} from '../../../../shared/extra-utils'
9import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login' 9import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login'
10import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email' 10import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email'
@@ -120,8 +120,9 @@ describe('Test users account verification', function () {
120 await userLogin(server, user2) 120 await userLogin(server, user2)
121 }) 121 })
122 122
123 after(function () { 123 after(async function () {
124 MockSmtpServer.Instance.kill() 124 MockSmtpServer.Instance.kill()
125 killallServers([ server ]) 125
126 await cleanupTests([ server ])
126 }) 127 })
127}) 128})
diff --git a/server/tests/api/users/users.ts b/server/tests/api/users/users.ts
index 8efff12ad..e7291740b 100644
--- a/server/tests/api/users/users.ts
+++ b/server/tests/api/users/users.ts
@@ -5,9 +5,10 @@ import 'mocha'
5import { User, UserRole } from '../../../../shared/index' 5import { User, UserRole } from '../../../../shared/index'
6import { 6import {
7 blockUser, 7 blockUser,
8 cleanupTests,
8 createUser, 9 createUser,
9 deleteMe, 10 deleteMe,
10 flushTests, 11 flushAndRunServer,
11 getAccountRatings, 12 getAccountRatings,
12 getBlacklistedVideosList, 13 getBlacklistedVideosList,
13 getMyUserInformation, 14 getMyUserInformation,
@@ -17,14 +18,12 @@ import {
17 getUsersList, 18 getUsersList,
18 getUsersListPaginationAndSort, 19 getUsersListPaginationAndSort,
19 getVideosList, 20 getVideosList,
20 killallServers,
21 login, 21 login,
22 makePutBodyRequest, 22 makePutBodyRequest,
23 rateVideo, 23 rateVideo,
24 registerUser, 24 registerUser,
25 removeUser, 25 removeUser,
26 removeVideo, 26 removeVideo,
27 flushAndRunServer,
28 ServerInfo, 27 ServerInfo,
29 testImage, 28 testImage,
30 unblockUser, 29 unblockUser,
@@ -677,7 +676,7 @@ describe('Test users', function () {
677 }) 676 })
678 }) 677 })
679 678
680 after(function () { 679 after(async function () {
681 killallServers([ server ]) 680 await cleanupTests([ server ])
682 }) 681 })
683}) 682})