aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/api
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-27 11:41:38 +0100
committerChocobozzz <me@florianbigard.com>2020-11-27 11:41:38 +0100
commit353f8bc0c7a71ad490e4501b8c80e13e5cec1932 (patch)
treea3a6c637e2baf57597c733dbc166b1959754bf34 /server/tests/api
parente2c1f7795752caf8cde19fdee8b9ab7fb16b0395 (diff)
downloadPeerTube-353f8bc0c7a71ad490e4501b8c80e13e5cec1932.tar.gz
PeerTube-353f8bc0c7a71ad490e4501b8c80e13e5cec1932.tar.zst
PeerTube-353f8bc0c7a71ad490e4501b8c80e13e5cec1932.zip
Add registered setting CLI plugin install test
Diffstat (limited to 'server/tests/api')
-rw-r--r--server/tests/api/server/plugins.ts16
1 files changed, 2 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
34import { PluginPackageJson } from '../../../../shared/models/plugins/plugin-package-json.model' 34import { PluginPackageJson } from '../../../../shared/models/plugins/plugin-package-json.model'
35import { PluginType } from '../../../../shared/models/plugins/plugin.type' 35import { PluginType } from '../../../../shared/models/plugins/plugin.type'
36import { PublicServerSetting } from '../../../../shared/models/plugins/public-server.setting' 36import { PublicServerSetting } from '../../../../shared/models/plugins/public-server.setting'
37import { RegisteredServerSettings } from '../../../../shared/models/plugins/register-server-setting.model'
38import { ServerConfig } from '../../../../shared/models/server' 37import { ServerConfig } from '../../../../shared/models/server'
39import { User } from '../../../../shared/models/users' 38import { 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 () {