aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/notifications/admin-notifications.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/api/notifications/admin-notifications.ts')
-rw-r--r--server/tests/api/notifications/admin-notifications.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/tests/api/notifications/admin-notifications.ts b/server/tests/api/notifications/admin-notifications.ts
index e07327d74..cfe0bd2bb 100644
--- a/server/tests/api/notifications/admin-notifications.ts
+++ b/server/tests/api/notifications/admin-notifications.ts
@@ -3,6 +3,7 @@
3import 'mocha' 3import 'mocha'
4import { expect } from 'chai' 4import { expect } from 'chai'
5import { MockJoinPeerTubeVersions } from '@shared/extra-utils/mock-servers/joinpeertube-versions' 5import { MockJoinPeerTubeVersions } from '@shared/extra-utils/mock-servers/joinpeertube-versions'
6import { PluginType } from '@shared/models'
6import { cleanupTests, installPlugin, setPluginLatestVersion, setPluginVersion, wait } from '../../../../shared/extra-utils' 7import { cleanupTests, installPlugin, setPluginLatestVersion, setPluginVersion, wait } from '../../../../shared/extra-utils'
7import { ServerInfo } from '../../../../shared/extra-utils/index' 8import { ServerInfo } from '../../../../shared/extra-utils/index'
8import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email' 9import { MockSmtpServer } from '../../../../shared/extra-utils/miscs/email'
@@ -13,7 +14,6 @@ import {
13 prepareNotificationsTest 14 prepareNotificationsTest
14} from '../../../../shared/extra-utils/users/user-notifications' 15} from '../../../../shared/extra-utils/users/user-notifications'
15import { UserNotification, UserNotificationType } from '../../../../shared/models/users' 16import { UserNotification, UserNotificationType } from '../../../../shared/models/users'
16import { PluginType } from '@shared/models'
17 17
18describe('Test admin notifications', function () { 18describe('Test admin notifications', function () {
19 let server: ServerInfo 19 let server: ServerInfo
@@ -26,11 +26,14 @@ describe('Test admin notifications', function () {
26 before(async function () { 26 before(async function () {
27 this.timeout(120000) 27 this.timeout(120000)
28 28
29 joinPeerTubeServer = new MockJoinPeerTubeVersions()
30 const port = await joinPeerTubeServer.initialize()
31
29 const config = { 32 const config = {
30 peertube: { 33 peertube: {
31 check_latest_version: { 34 check_latest_version: {
32 enabled: true, 35 enabled: true,
33 url: 'http://localhost:42102/versions.json' 36 url: `http://localhost:${port}/versions.json`
34 } 37 }
35 }, 38 },
36 plugins: { 39 plugins: {
@@ -66,9 +69,6 @@ describe('Test admin notifications', function () {
66 accessToken: server.accessToken, 69 accessToken: server.accessToken,
67 npmName: 'peertube-theme-background-red' 70 npmName: 'peertube-theme-background-red'
68 }) 71 })
69
70 joinPeerTubeServer = new MockJoinPeerTubeVersions()
71 await joinPeerTubeServer.initialize()
72 }) 72 })
73 73
74 describe('Latest PeerTube version notification', function () { 74 describe('Latest PeerTube version notification', function () {