aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/external-plugins/auto-mute.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-16 09:47:51 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit254d3579f5338f5fd775c17d15cdfc37078bcfb4 (patch)
treeeaeb13fda16c16e98cd6991d202b0ca6a4cbdb63 /server/tests/external-plugins/auto-mute.ts
parent89d241a79c262b9775c233b73cff080043ebb5e6 (diff)
downloadPeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.gz
PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.zst
PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.zip
Use an object to represent a server
Diffstat (limited to 'server/tests/external-plugins/auto-mute.ts')
-rw-r--r--server/tests/external-plugins/auto-mute.ts11
1 files changed, 5 insertions, 6 deletions
diff --git a/server/tests/external-plugins/auto-mute.ts b/server/tests/external-plugins/auto-mute.ts
index 25b56a546..771201505 100644
--- a/server/tests/external-plugins/auto-mute.ts
+++ b/server/tests/external-plugins/auto-mute.ts
@@ -6,26 +6,25 @@ import { HttpStatusCode } from '@shared/core-utils'
6import { 6import {
7 cleanupTests, 7 cleanupTests,
8 doubleFollow, 8 doubleFollow,
9 flushAndRunMultipleServers, 9 createMultipleServers,
10 killallServers, 10 killallServers,
11 makeGetRequest, 11 makeGetRequest,
12 MockBlocklist, 12 MockBlocklist,
13 reRunServer, 13 PeerTubeServer,
14 ServerInfo,
15 setAccessTokensToServers, 14 setAccessTokensToServers,
16 wait 15 wait
17} from '@shared/extra-utils' 16} from '@shared/extra-utils'
18 17
19describe('Official plugin auto-mute', function () { 18describe('Official plugin auto-mute', function () {
20 const autoMuteListPath = '/plugins/auto-mute/router/api/v1/mute-list' 19 const autoMuteListPath = '/plugins/auto-mute/router/api/v1/mute-list'
21 let servers: ServerInfo[] 20 let servers: PeerTubeServer[]
22 let blocklistServer: MockBlocklist 21 let blocklistServer: MockBlocklist
23 let port: number 22 let port: number
24 23
25 before(async function () { 24 before(async function () {
26 this.timeout(30000) 25 this.timeout(30000)
27 26
28 servers = await flushAndRunMultipleServers(2) 27 servers = await createMultipleServers(2)
29 await setAccessTokensToServers(servers) 28 await setAccessTokensToServers(servers)
30 29
31 for (const server of servers) { 30 for (const server of servers) {
@@ -150,7 +149,7 @@ describe('Official plugin auto-mute', function () {
150 } 149 }
151 150
152 await killallServers([ servers[0] ]) 151 await killallServers([ servers[0] ])
153 await reRunServer(servers[0]) 152 await servers[0].run()
154 await wait(2000) 153 await wait(2000)
155 154
156 { 155 {