aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/plugins/plugin-helpers.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/plugins/plugin-helpers.ts')
-rw-r--r--server/tests/plugins/plugin-helpers.ts27
1 files changed, 26 insertions, 1 deletions
diff --git a/server/tests/plugins/plugin-helpers.ts b/server/tests/plugins/plugin-helpers.ts
index a585e3020..325d20e84 100644
--- a/server/tests/plugins/plugin-helpers.ts
+++ b/server/tests/plugins/plugin-helpers.ts
@@ -12,7 +12,8 @@ import {
12 uploadVideoAndGetId, 12 uploadVideoAndGetId,
13 viewVideo, 13 viewVideo,
14 getVideosList, 14 getVideosList,
15 waitJobs 15 waitJobs,
16 makeGetRequest
16} from '../../../shared/extra-utils' 17} from '../../../shared/extra-utils'
17import { cleanupTests, flushAndRunMultipleServers, ServerInfo, waitUntilLog } from '../../../shared/extra-utils/server/servers' 18import { cleanupTests, flushAndRunMultipleServers, ServerInfo, waitUntilLog } from '../../../shared/extra-utils/server/servers'
18import { expect } from 'chai' 19import { expect } from 'chai'
@@ -68,6 +69,17 @@ describe('Test plugin helpers', function () {
68 it('Should have the correct webserver url', async function () { 69 it('Should have the correct webserver url', async function () {
69 await waitUntilLog(servers[0], `server url is http://localhost:${servers[0].port}`) 70 await waitUntilLog(servers[0], `server url is http://localhost:${servers[0].port}`)
70 }) 71 })
72
73 it('Should have the correct config', async function () {
74 const res = await makeGetRequest({
75 url: servers[0].url,
76 path: '/plugins/test-four/router/server-config',
77 statusCodeExpected: HttpStatusCode.OK_200
78 })
79
80 expect(res.body.serverConfig).to.exist
81 expect(res.body.serverConfig.instance.name).to.equal('PeerTube')
82 })
71 }) 83 })
72 84
73 describe('Server', function () { 85 describe('Server', function () {
@@ -77,6 +89,19 @@ describe('Test plugin helpers', function () {
77 }) 89 })
78 }) 90 })
79 91
92 describe('Plugin', function () {
93
94 it('Should get the base static route', async function () {
95 const res = await makeGetRequest({
96 url: servers[0].url,
97 path: '/plugins/test-four/router/static-route',
98 statusCodeExpected: HttpStatusCode.OK_200
99 })
100
101 expect(res.body.staticRoute).to.equal('/plugins/test-four/0.0.1/static/')
102 })
103 })
104
80 describe('Moderation', function () { 105 describe('Moderation', function () {
81 let videoUUIDServer1: string 106 let videoUUIDServer1: string
82 107