aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api/notifications/admin-notifications.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-04-15 13:52:27 +0200
committerChocobozzz <me@florianbigard.com>2021-04-15 13:52:27 +0200
commitf6500729850549e632399155d0f3b69822e28b16 (patch)
tree7ca40188e38b0281f538c4cddf79ea633745cc4a /server/tests/api/notifications/admin-notifications.ts
parentf1ac63488c0050fec1c4d713d74db4f4ea944395 (diff)
downloadPeerTube-f6500729850549e632399155d0f3b69822e28b16.tar.gz
PeerTube-f6500729850549e632399155d0f3b69822e28b16.tar.zst
PeerTube-f6500729850549e632399155d0f3b69822e28b16.zip
More robust tests
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 () {