aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/external-plugins/auto-block-videos.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/external-plugins/auto-block-videos.ts')
-rw-r--r--server/tests/external-plugins/auto-block-videos.ts13
1 files changed, 6 insertions, 7 deletions
diff --git a/server/tests/external-plugins/auto-block-videos.ts b/server/tests/external-plugins/auto-block-videos.ts
index 3b4b48bf0..9cb86310b 100644
--- a/server/tests/external-plugins/auto-block-videos.ts
+++ b/server/tests/external-plugins/auto-block-videos.ts
@@ -5,17 +5,16 @@ import { expect } from 'chai'
5import { 5import {
6 cleanupTests, 6 cleanupTests,
7 doubleFollow, 7 doubleFollow,
8 flushAndRunMultipleServers, 8 createMultipleServers,
9 killallServers, 9 killallServers,
10 MockBlocklist, 10 MockBlocklist,
11 reRunServer, 11 PeerTubeServer,
12 ServerInfo,
13 setAccessTokensToServers, 12 setAccessTokensToServers,
14 wait 13 wait
15} from '@shared/extra-utils' 14} from '@shared/extra-utils'
16import { Video } from '@shared/models' 15import { Video } from '@shared/models'
17 16
18async function check (server: ServerInfo, videoUUID: string, exists = true) { 17async function check (server: PeerTubeServer, videoUUID: string, exists = true) {
19 const { data } = await server.videos.list() 18 const { data } = await server.videos.list()
20 19
21 const video = data.find(v => v.uuid === videoUUID) 20 const video = data.find(v => v.uuid === videoUUID)
@@ -25,7 +24,7 @@ async function check (server: ServerInfo, videoUUID: string, exists = true) {
25} 24}
26 25
27describe('Official plugin auto-block videos', function () { 26describe('Official plugin auto-block videos', function () {
28 let servers: ServerInfo[] 27 let servers: PeerTubeServer[]
29 let blocklistServer: MockBlocklist 28 let blocklistServer: MockBlocklist
30 let server1Videos: Video[] = [] 29 let server1Videos: Video[] = []
31 let server2Videos: Video[] = [] 30 let server2Videos: Video[] = []
@@ -34,7 +33,7 @@ describe('Official plugin auto-block videos', function () {
34 before(async function () { 33 before(async function () {
35 this.timeout(60000) 34 this.timeout(60000)
36 35
37 servers = await flushAndRunMultipleServers(2) 36 servers = await createMultipleServers(2)
38 await setAccessTokensToServers(servers) 37 await setAccessTokensToServers(servers)
39 38
40 for (const server of servers) { 39 for (const server of servers) {
@@ -161,7 +160,7 @@ describe('Official plugin auto-block videos', function () {
161 await check(servers[0], video.uuid, true) 160 await check(servers[0], video.uuid, true)
162 161
163 await killallServers([ servers[0] ]) 162 await killallServers([ servers[0] ])
164 await reRunServer(servers[0]) 163 await servers[0].run()
165 await wait(2000) 164 await wait(2000)
166 165
167 await check(servers[0], video.uuid, true) 166 await check(servers[0], video.uuid, true)