X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fapi%2Fmoderation%2Fvideo-blacklist.ts;h=1790210ffb2ddf4cafd9735c039564cd4674e0c3;hb=ab4b8974997777373a6032073f9c1aaf33ba9931;hp=62cbf2e0790d52333c4df6852c2b3b3c036423f1;hpb=254d3579f5338f5fd775c17d15cdfc37078bcfb4;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/api/moderation/video-blacklist.ts b/server/tests/api/moderation/video-blacklist.ts index 62cbf2e07..1790210ff 100644 --- a/server/tests/api/moderation/video-blacklist.ts +++ b/server/tests/api/moderation/video-blacklist.ts @@ -3,18 +3,19 @@ import 'mocha' import * as chai from 'chai' import { orderBy } from 'lodash' +import { FIXTURE_URLS } from '@server/tests/shared' +import { UserAdminFlag, UserRole, VideoBlacklist, VideoBlacklistType } from '@shared/models' import { BlacklistCommand, cleanupTests, - doubleFollow, createMultipleServers, - ImportsCommand, + doubleFollow, killallServers, PeerTubeServer, setAccessTokensToServers, + setDefaultChannelAvatar, waitJobs -} from '@shared/extra-utils' -import { UserAdminFlag, UserRole, VideoBlacklist, VideoBlacklistType } from '@shared/models' +} from '@shared/server-commands' const expect = chai.expect @@ -32,7 +33,7 @@ describe('Test video blacklist', function () { } before(async function () { - this.timeout(50000) + this.timeout(120000) // Run servers servers = await createMultipleServers(2) @@ -42,6 +43,7 @@ describe('Test video blacklist', function () { // Server 1 and server 2 follow each other await doubleFollow(servers[0], servers[1]) + await setDefaultChannelAvatar(servers[0]) // Upload 2 videos on server 2 await servers[1].videos.upload({ attributes: { name: 'My 1st video', description: 'A video on server 2' } }) @@ -387,7 +389,7 @@ describe('Test video blacklist', function () { this.timeout(15000) const attributes = { - targetUrl: ImportsCommand.getGoodVideoUrl(), + targetUrl: FIXTURE_URLS.goodVideo, name: 'URL import', channelId: channelOfUserWithoutFlag } @@ -400,7 +402,7 @@ describe('Test video blacklist', function () { it('Should auto blacklist a video on torrent import', async function () { const attributes = { - magnetUri: ImportsCommand.getMagnetURI(), + magnetUri: FIXTURE_URLS.magnet, name: 'Torrent import', channelId: channelOfUserWithoutFlag }