X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fcheck-params%2Fvideos-history.ts;h=3739e3fad8151e9b9cab280992ffb38edc42c011;hb=592c735c19b25e9b38f82d90d15a81307902ed62;hp=8c079a956c455aec6964fbcced561726bae6bafb;hpb=88108880bbdba473cfe36ecbebc1c3c4f972e102;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/check-params/videos-history.ts b/server/tests/api/check-params/videos-history.ts index 8c079a956..3739e3fad 100644 --- a/server/tests/api/check-params/videos-history.ts +++ b/server/tests/api/check-params/videos-history.ts @@ -5,16 +5,15 @@ import 'mocha' import { checkBadCountPagination, checkBadStartPagination, - flushTests, - killallServers, + cleanupTests, + flushAndRunServer, makeGetRequest, makePostBodyRequest, makePutBodyRequest, - runServer, ServerInfo, setAccessTokensToServers, uploadVideo -} from '../../../../shared/utils' +} from '../../../../shared/extra-utils' const expect = chai.expect @@ -29,9 +28,7 @@ describe('Test videos history API validator', function () { before(async function () { this.timeout(30000) - await flushTests() - - server = await runServer(1) + server = await flushAndRunServer(1) await setAccessTokensToServers([ server ]) @@ -129,11 +126,6 @@ describe('Test videos history API validator', function () { }) after(async function () { - killallServers([ server ]) - - // Keep the logs if the test failed - if (this['ok']) { - await flushTests() - } + await cleanupTests([ server ]) }) })