X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fexternal-plugins%2Fauto-block-videos.ts;h=95d7a4b58a5908185ca8f65aef1fb89d03bda6d7;hb=cffef25313bdf7a6c435f56ac6715fdd91acf7b3;hp=0eb4bda9ade8e0e9c007419cd4f9f81411e0af64;hpb=171efc48e67498406feb6d7873b3482b41505515;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/external-plugins/auto-block-videos.ts b/server/tests/external-plugins/auto-block-videos.ts index 0eb4bda9a..95d7a4b58 100644 --- a/server/tests/external-plugins/auto-block-videos.ts +++ b/server/tests/external-plugins/auto-block-videos.ts @@ -1,18 +1,17 @@ /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ -import 'mocha' import { expect } from 'chai' +import { wait } from '@shared/core-utils' +import { Video } from '@shared/models' import { cleanupTests, createMultipleServers, doubleFollow, killallServers, - MockBlocklist, PeerTubeServer, - setAccessTokensToServers, - wait -} from '@shared/extra-utils' -import { Video } from '@shared/models' + setAccessTokensToServers +} from '@shared/server-commands' +import { MockBlocklist } from '../shared' async function check (server: PeerTubeServer, videoUUID: string, exists = true) { const { data } = await server.videos.list() @@ -31,7 +30,7 @@ describe('Official plugin auto-block videos', function () { let port: number before(async function () { - this.timeout(60000) + this.timeout(120000) servers = await createMultipleServers(2) await setAccessTokensToServers(servers) @@ -65,15 +64,13 @@ describe('Official plugin auto-block videos', function () { await servers[0].plugins.updateSettings({ npmName: 'peertube-plugin-auto-block-videos', settings: { - 'blocklist-urls': `http://localhost:${port}/blocklist`, + 'blocklist-urls': `http://127.0.0.1:${port}/blocklist`, 'check-seconds-interval': 1 } }) }) it('Should auto block a video', async function () { - this.timeout(10000) - await check(servers[0], server2Videos[0].uuid, true) blocklistServer.replace({ @@ -99,8 +96,6 @@ describe('Official plugin auto-block videos', function () { }) it('Should not block a local video', async function () { - this.timeout(10000) - await check(servers[0], server1Videos[0].uuid, true) blocklistServer.replace({ @@ -117,8 +112,6 @@ describe('Official plugin auto-block videos', function () { }) it('Should remove a video block', async function () { - this.timeout(10000) - await check(servers[0], server2Videos[0].uuid, false) blocklistServer.replace({