From 210feb6cc484a6c5c63c98f770de34e223f944cb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 24 Apr 2019 10:53:40 +0200 Subject: Cleanup tests --- server/tests/api/check-params/users.ts | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'server/tests/api/check-params/users.ts') diff --git a/server/tests/api/check-params/users.ts b/server/tests/api/check-params/users.ts index b62806554..00d0a7e2b 100644 --- a/server/tests/api/check-params/users.ts +++ b/server/tests/api/check-params/users.ts @@ -7,7 +7,7 @@ import { UserRole, VideoImport, VideoImportState } from '../../../../shared' import { createUser, flushTests, getMyUserInformation, getMyUserVideoRating, getUsersList, immutableAssign, killallServers, makeGetRequest, - makePostBodyRequest, makeUploadRequest, makePutBodyRequest, registerUser, removeUser, runServer, ServerInfo, setAccessTokensToServers, + makePostBodyRequest, makeUploadRequest, makePutBodyRequest, registerUser, removeUser, flushAndRunServer, ServerInfo, setAccessTokensToServers, updateUser, uploadVideo, userLogin, deleteMe, unblockUser, blockUser } from '../../../../shared/extra-utils' import { @@ -40,10 +40,8 @@ describe('Test users API validators', function () { before(async function () { this.timeout(30000) - await flushTests() - - server = await runServer(1) - serverWithRegistrationDisabled = await runServer(2) + server = await flushAndRunServer(1) + serverWithRegistrationDisabled = await flushAndRunServer(2) await setAccessTokensToServers([ server ]) @@ -881,12 +879,7 @@ describe('Test users API validators', function () { }) }) - after(async function () { + after(function () { killallServers([ server, serverWithRegistrationDisabled ]) - - // Keep the logs if the test failed - if (this['ok']) { - await flushTests() - } }) }) -- cgit v1.2.3