aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/plugins/action-hooks.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/plugins/action-hooks.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/plugins/action-hooks.ts')
-rw-r--r--server/tests/plugins/action-hooks.ts11
1 files changed, 5 insertions, 6 deletions
diff --git a/server/tests/plugins/action-hooks.ts b/server/tests/plugins/action-hooks.ts
index 12d5c23c5..b96de4e90 100644
--- a/server/tests/plugins/action-hooks.ts
+++ b/server/tests/plugins/action-hooks.ts
@@ -3,18 +3,17 @@
3import 'mocha' 3import 'mocha'
4import { 4import {
5 cleanupTests, 5 cleanupTests,
6 flushAndRunMultipleServers, 6 createMultipleServers,
7 killallServers, 7 killallServers,
8 PeerTubeServer,
8 PluginsCommand, 9 PluginsCommand,
9 reRunServer,
10 ServerInfo,
11 setAccessTokensToServers, 10 setAccessTokensToServers,
12 setDefaultVideoChannel 11 setDefaultVideoChannel
13} from '@shared/extra-utils' 12} from '@shared/extra-utils'
14import { ServerHookName, VideoPlaylistPrivacy, VideoPrivacy } from '@shared/models' 13import { ServerHookName, VideoPlaylistPrivacy, VideoPrivacy } from '@shared/models'
15 14
16describe('Test plugin action hooks', function () { 15describe('Test plugin action hooks', function () {
17 let servers: ServerInfo[] 16 let servers: PeerTubeServer[]
18 let videoUUID: string 17 let videoUUID: string
19 let threadId: number 18 let threadId: number
20 19
@@ -25,7 +24,7 @@ describe('Test plugin action hooks', function () {
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 await setDefaultVideoChannel(servers) 29 await setDefaultVideoChannel(servers)
31 30
@@ -33,7 +32,7 @@ describe('Test plugin action hooks', function () {
33 32
34 await killallServers([ servers[0] ]) 33 await killallServers([ servers[0] ])
35 34
36 await reRunServer(servers[0], { 35 await servers[0].run({
37 live: { 36 live: {
38 enabled: true 37 enabled: true
39 } 38 }