From 210feb6cc484a6c5c63c98f770de34e223f944cb Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 24 Apr 2019 10:53:40 +0200 Subject: Cleanup tests --- .../tests/api/search/search-activitypub-video-channels.ts | 9 +-------- server/tests/api/search/search-activitypub-videos.ts | 9 +-------- server/tests/api/search/search-videos.ts | 13 +++---------- 3 files changed, 5 insertions(+), 26 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 1f59a951b..c5662f049 100644 --- a/server/tests/api/search/search-activitypub-video-channels.ts +++ b/server/tests/api/search/search-activitypub-video-channels.ts @@ -33,8 +33,6 @@ describe('Test a ActivityPub video channels search', function () { before(async function () { this.timeout(120000) - await flushTests() - servers = await flushAndRunMultipleServers(2) await setAccessTokensToServers(servers) @@ -207,12 +205,7 @@ describe('Test a ActivityPub video channels search', function () { expect(res.body.data).to.have.lengthOf(0) }) - after(async function () { + after(function () { killallServers(servers) - - // Keep the logs if the test failed - if (this['ok']) { - await flushTests() - } }) }) diff --git a/server/tests/api/search/search-activitypub-videos.ts b/server/tests/api/search/search-activitypub-videos.ts index d984c696c..5c2a44ad5 100644 --- a/server/tests/api/search/search-activitypub-videos.ts +++ b/server/tests/api/search/search-activitypub-videos.ts @@ -30,8 +30,6 @@ describe('Test a ActivityPub videos search', function () { before(async function () { this.timeout(120000) - await flushTests() - servers = await flushAndRunMultipleServers(2) await setAccessTokensToServers(servers) @@ -151,12 +149,7 @@ describe('Test a ActivityPub videos search', function () { expect(res.body.data).to.have.lengthOf(0) }) - after(async function () { + after(function () { killallServers(servers) - - // Keep the logs if the test failed - if (this['ok']) { - await flushTests() - } }) }) diff --git a/server/tests/api/search/search-videos.ts b/server/tests/api/search/search-videos.ts index 65f3c9186..d1520a9aa 100644 --- a/server/tests/api/search/search-videos.ts +++ b/server/tests/api/search/search-videos.ts @@ -6,7 +6,7 @@ import { advancedVideosSearch, flushTests, killallServers, - runServer, + flushAndRunServer, searchVideo, ServerInfo, setAccessTokensToServers, @@ -24,9 +24,7 @@ describe('Test a videos search', function () { before(async function () { this.timeout(30000) - await flushTests() - - server = await runServer(1) + server = await flushAndRunServer(1) await setAccessTokensToServers([ server ]) @@ -407,12 +405,7 @@ describe('Test a videos search', function () { } }) - after(async function () { + after(function () { killallServers([ server ]) - - // Keep the logs if the test failed - if (this['ok']) { - await flushTests() - } }) }) -- cgit v1.2.3