From 7c3b79768bd174b22154e8d2df0b1211e01ee56a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 24 Apr 2019 15:10:37 +0200 Subject: Use test wrapper exit function --- server/tests/api/search/search-activitypub-video-channels.ts | 6 +++--- server/tests/api/search/search-activitypub-videos.ts | 6 +++--- server/tests/api/search/search-videos.ts | 7 ++++--- 3 files changed, 10 insertions(+), 9 deletions(-) (limited to 'server/tests/api/search') 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 @@ import * as chai from 'chai' import 'mocha' import { - addVideoChannel, + addVideoChannel, cleanupTests, createUser, deleteVideoChannel, flushAndRunMultipleServers, @@ -205,7 +205,7 @@ describe('Test a ActivityPub video channels search', function () { expect(res.body.data).to.have.lengthOf(0) }) - after(function () { - killallServers(servers) + after(async function () { + await cleanupTests(servers) }) }) 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 { updateVideo, uploadVideo, wait, - searchVideo + searchVideo, cleanupTests } from '../../../../shared/extra-utils' import { waitJobs } from '../../../../shared/extra-utils/server/jobs' import { Video, VideoPrivacy } from '../../../../shared/models/videos' @@ -149,7 +149,7 @@ describe('Test a ActivityPub videos search', function () { expect(res.body.data).to.have.lengthOf(0) }) - after(function () { - killallServers(servers) + after(async function () { + await cleanupTests(servers) }) }) 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 { setAccessTokensToServers, uploadVideo, wait, - immutableAssign + immutableAssign, + cleanupTests } from '../../../../shared/extra-utils' const expect = chai.expect @@ -405,7 +406,7 @@ describe('Test a videos search', function () { } }) - after(function () { - killallServers([ server ]) + after(async function () { + await cleanupTests([ server ]) }) }) -- cgit v1.2.3