aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/external-plugins/auto-mute.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-03 09:06:51 +0200
committerChocobozzz <me@florianbigard.com>2021-06-03 09:06:51 +0200
commit63da15eb18065ef6c419f073c95fec6ef5541652 (patch)
treea95855514d4d7ed8dd1bba0934d8640902ff330e /server/tests/external-plugins/auto-mute.ts
parent38c5c166f4204292d58f61658a063408a9e7b78c (diff)
downloadPeerTube-63da15eb18065ef6c419f073c95fec6ef5541652.tar.gz
PeerTube-63da15eb18065ef6c419f073c95fec6ef5541652.tar.zst
PeerTube-63da15eb18065ef6c419f073c95fec6ef5541652.zip
Use random port for mock servers in tests
Diffstat (limited to 'server/tests/external-plugins/auto-mute.ts')
-rw-r--r--server/tests/external-plugins/auto-mute.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/tests/external-plugins/auto-mute.ts b/server/tests/external-plugins/auto-mute.ts
index 687f56e98..09355d932 100644
--- a/server/tests/external-plugins/auto-mute.ts
+++ b/server/tests/external-plugins/auto-mute.ts
@@ -31,6 +31,7 @@ describe('Official plugin auto-mute', function () {
31 const autoMuteListPath = '/plugins/auto-mute/router/api/v1/mute-list' 31 const autoMuteListPath = '/plugins/auto-mute/router/api/v1/mute-list'
32 let servers: ServerInfo[] 32 let servers: ServerInfo[]
33 let blocklistServer: MockBlocklist 33 let blocklistServer: MockBlocklist
34 let port: number
34 35
35 before(async function () { 36 before(async function () {
36 this.timeout(30000) 37 this.timeout(30000)
@@ -47,7 +48,7 @@ describe('Official plugin auto-mute', function () {
47 } 48 }
48 49
49 blocklistServer = new MockBlocklist() 50 blocklistServer = new MockBlocklist()
50 await blocklistServer.initialize() 51 port = await blocklistServer.initialize()
51 52
52 await uploadVideoAndGetId({ server: servers[0], videoName: 'video server 1' }) 53 await uploadVideoAndGetId({ server: servers[0], videoName: 'video server 1' })
53 await uploadVideoAndGetId({ server: servers[1], videoName: 'video server 2' }) 54 await uploadVideoAndGetId({ server: servers[1], videoName: 'video server 2' })
@@ -61,7 +62,7 @@ describe('Official plugin auto-mute', function () {
61 accessToken: servers[0].accessToken, 62 accessToken: servers[0].accessToken,
62 npmName: 'peertube-plugin-auto-mute', 63 npmName: 'peertube-plugin-auto-mute',
63 settings: { 64 settings: {
64 'blocklist-urls': 'http://localhost:42100/blocklist', 65 'blocklist-urls': `http://localhost:${port}/blocklist`,
65 'check-seconds-interval': 1 66 'check-seconds-interval': 1
66 } 67 }
67 }) 68 })