diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/tests/api/server/plugins.ts | 16 | ||||
-rw-r--r-- | server/tests/cli/peertube.ts | 5 |
2 files changed, 7 insertions, 14 deletions
diff --git a/server/tests/api/server/plugins.ts b/server/tests/api/server/plugins.ts index ecf7c0d3f..1c6eabe6d 100644 --- a/server/tests/api/server/plugins.ts +++ b/server/tests/api/server/plugins.ts | |||
@@ -10,7 +10,6 @@ import { | |||
10 | getMyUserInformation, | 10 | getMyUserInformation, |
11 | getPlugin, | 11 | getPlugin, |
12 | getPluginPackageJSON, | 12 | getPluginPackageJSON, |
13 | getPluginRegisteredSettings, | ||
14 | getPublicSettings, | 13 | getPublicSettings, |
15 | installPlugin, | 14 | installPlugin, |
16 | killallServers, | 15 | killallServers, |
@@ -20,6 +19,7 @@ import { | |||
20 | ServerInfo, | 19 | ServerInfo, |
21 | setAccessTokensToServers, | 20 | setAccessTokensToServers, |
22 | setPluginVersion, | 21 | setPluginVersion, |
22 | testHelloWorldRegisteredSettings, | ||
23 | uninstallPlugin, | 23 | uninstallPlugin, |
24 | updateCustomSubConfig, | 24 | updateCustomSubConfig, |
25 | updateMyUser, | 25 | updateMyUser, |
@@ -34,7 +34,6 @@ import { PeerTubePlugin } from '../../../../shared/models/plugins/peertube-plugi | |||
34 | import { PluginPackageJson } from '../../../../shared/models/plugins/plugin-package-json.model' | 34 | import { PluginPackageJson } from '../../../../shared/models/plugins/plugin-package-json.model' |
35 | import { PluginType } from '../../../../shared/models/plugins/plugin.type' | 35 | import { PluginType } from '../../../../shared/models/plugins/plugin.type' |
36 | import { PublicServerSetting } from '../../../../shared/models/plugins/public-server.setting' | 36 | import { PublicServerSetting } from '../../../../shared/models/plugins/public-server.setting' |
37 | import { RegisteredServerSettings } from '../../../../shared/models/plugins/register-server-setting.model' | ||
38 | import { ServerConfig } from '../../../../shared/models/server' | 37 | import { ServerConfig } from '../../../../shared/models/server' |
39 | import { User } from '../../../../shared/models/users' | 38 | import { User } from '../../../../shared/models/users' |
40 | 39 | ||
@@ -209,18 +208,7 @@ describe('Test plugins', function () { | |||
209 | }) | 208 | }) |
210 | 209 | ||
211 | it('Should get registered settings', async function () { | 210 | it('Should get registered settings', async function () { |
212 | const res = await getPluginRegisteredSettings({ | 211 | await testHelloWorldRegisteredSettings(server) |
213 | url: server.url, | ||
214 | accessToken: server.accessToken, | ||
215 | npmName: 'peertube-plugin-hello-world' | ||
216 | }) | ||
217 | |||
218 | const registeredSettings = (res.body as RegisteredServerSettings).registeredSettings | ||
219 | |||
220 | expect(registeredSettings).to.have.length.at.least(1) | ||
221 | |||
222 | const adminNameSettings = registeredSettings.find(s => s.name === 'admin-name') | ||
223 | expect(adminNameSettings).to.not.be.undefined | ||
224 | }) | 212 | }) |
225 | 213 | ||
226 | it('Should get public settings', async function () { | 214 | it('Should get public settings', async function () { |
diff --git a/server/tests/cli/peertube.ts b/server/tests/cli/peertube.ts index e2861f46e..348438533 100644 --- a/server/tests/cli/peertube.ts +++ b/server/tests/cli/peertube.ts | |||
@@ -19,6 +19,7 @@ import { | |||
19 | removeVideo, | 19 | removeVideo, |
20 | ServerInfo, | 20 | ServerInfo, |
21 | setAccessTokensToServers, | 21 | setAccessTokensToServers, |
22 | testHelloWorldRegisteredSettings, | ||
22 | uploadVideoAndGetId, | 23 | uploadVideoAndGetId, |
23 | userLogin, | 24 | userLogin, |
24 | waitJobs | 25 | waitJobs |
@@ -205,6 +206,10 @@ describe('Test CLI wrapper', function () { | |||
205 | await execCLI(`${env} ${cmd} plugins install --npm-name peertube-plugin-hello-world`) | 206 | await execCLI(`${env} ${cmd} plugins install --npm-name peertube-plugin-hello-world`) |
206 | }) | 207 | }) |
207 | 208 | ||
209 | it('Should have registered settings', async function () { | ||
210 | await testHelloWorldRegisteredSettings(server) | ||
211 | }) | ||
212 | |||
208 | it('Should list installed plugins', async function () { | 213 | it('Should list installed plugins', async function () { |
209 | const env = getEnvCli(server) | 214 | const env = getEnvCli(server) |
210 | const res = await execCLI(`${env} ${cmd} plugins list`) | 215 | const res = await execCLI(`${env} ${cmd} plugins list`) |