X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fusers%2Fusers-verification.ts;h=3b37a26cfe2721a85aba227e1e34f4636da89d6b;hb=e590b4a512617bbf63595b684386f68abea7d8b8;hp=295caae978dd13f71397ef69dcc16b05a2308723;hpb=210feb6cc484a6c5c63c98f770de34e223f944cb;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/users/users-verification.ts b/server/tests/api/users/users-verification.ts index 295caae97..3b37a26cf 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' import 'mocha' import { registerUser, flushTests, getUserInformation, getMyUserInformation, killallServers, - userLogin, login, flushAndRunServer, ServerInfo, verifyEmail, updateCustomSubConfig, wait + userLogin, login, flushAndRunServer, ServerInfo, verifyEmail, updateCustomSubConfig, wait, cleanupTests } from '../../../../shared/extra-utils' import { setAccessTokensToServers } from '../../../../shared/extra-utils/users/login' import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email' @@ -30,11 +30,12 @@ describe('Test users account verification', function () { before(async function () { this.timeout(30000) - await MockSmtpServer.Instance.collectEmails(emails) + const port = await MockSmtpServer.Instance.collectEmails(emails) const overrideConfig = { smtp: { - hostname: 'localhost' + hostname: 'localhost', + port } } server = await flushAndRunServer(1, overrideConfig) @@ -120,8 +121,9 @@ describe('Test users account verification', function () { await userLogin(server, user2) }) - after(function () { + after(async function () { MockSmtpServer.Instance.kill() - killallServers([ server ]) + + await cleanupTests([ server ]) }) })