X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fvideos%2Fvideos-history.ts;h=c7e55c1ab7625a2dbe043e9a0f4e281e30716b7a;hb=97567dd81f508dd6295ac4d73d849aa2ce0a6549;hp=ab40bb64cb76c1455b445a22c5b05dc661e8f1aa;hpb=1eddc9a74f9a80fa5d0cb25fceb3fc47a1a3c14a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/videos/videos-history.ts b/server/tests/api/videos/videos-history.ts index ab40bb64c..c7e55c1ab 100644 --- a/server/tests/api/videos/videos-history.ts +++ b/server/tests/api/videos/videos-history.ts @@ -3,12 +3,13 @@ import * as chai from 'chai' import 'mocha' import { + cleanupTests, createUser, - flushTests, + flushAndRunServer, getVideosListWithToken, getVideoWithToken, - killallServers, reRunServer, - runServer, + killallServers, + reRunServer, searchVideoWithToken, ServerInfo, setAccessTokensToServers, @@ -16,9 +17,9 @@ import { uploadVideo, userLogin, wait -} from '../../../../shared/utils' +} from '../../../../shared/extra-utils' import { Video, VideoDetails } from '../../../../shared/models/videos' -import { listMyVideosHistory, removeMyVideosHistory, userWatchVideo } from '../../../../shared/utils/videos/video-history' +import { listMyVideosHistory, removeMyVideosHistory, userWatchVideo } from '../../../../shared/extra-utils/videos/video-history' const expect = chai.expect @@ -33,9 +34,7 @@ describe('Test videos history', function () { before(async function () { this.timeout(30000) - await flushTests() - - server = await runServer(1) + server = await flushAndRunServer(1) await setAccessTokensToServers([ server ]) @@ -223,11 +222,6 @@ describe('Test videos history', function () { }) after(async function () { - killallServers([ server ]) - - // Keep the logs if the test failed - if (this['ok']) { - await flushTests() - } + await cleanupTests([ server ]) }) })