aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/cli/peertube.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/tests/cli/peertube.ts')
-rw-r--r--server/tests/cli/peertube.ts27
1 files changed, 22 insertions, 5 deletions
diff --git a/server/tests/cli/peertube.ts b/server/tests/cli/peertube.ts
index f2a984962..034d216e3 100644
--- a/server/tests/cli/peertube.ts
+++ b/server/tests/cli/peertube.ts
@@ -2,19 +2,17 @@
2 2
3import 'mocha' 3import 'mocha'
4import { expect } from 'chai' 4import { expect } from 'chai'
5import { areHttpImportTestsDisabled, buildAbsoluteFixturePath } from '@shared/core-utils'
5import { 6import {
6 areHttpImportTestsDisabled,
7 buildAbsoluteFixturePath,
8 cleanupTests, 7 cleanupTests,
9 CLICommand, 8 CLICommand,
10 createSingleServer, 9 createSingleServer,
11 doubleFollow, 10 doubleFollow,
12 FIXTURE_URLS,
13 PeerTubeServer, 11 PeerTubeServer,
14 setAccessTokensToServers, 12 setAccessTokensToServers,
15 testHelloWorldRegisteredSettings,
16 waitJobs 13 waitJobs
17} from '../../../shared/extra-utils' 14} from '@shared/server-commands'
15import { FIXTURE_URLS, testHelloWorldRegisteredSettings } from '../shared'
18 16
19describe('Test CLI wrapper', function () { 17describe('Test CLI wrapper', function () {
20 let server: PeerTubeServer 18 let server: PeerTubeServer
@@ -207,6 +205,25 @@ describe('Test CLI wrapper', function () {
207 205
208 expect(res).to.not.contain('peertube-plugin-hello-world') 206 expect(res).to.not.contain('peertube-plugin-hello-world')
209 }) 207 })
208
209 it('Should install a plugin in requested version', async function () {
210 this.timeout(60000)
211
212 await cliCommand.execWithEnv(`${cmd} plugins install --npm-name peertube-plugin-hello-world --plugin-version 0.0.17`)
213 })
214
215 it('Should list installed plugins, in correct version', async function () {
216 const res = await cliCommand.execWithEnv(`${cmd} plugins list`)
217
218 expect(res).to.contain('peertube-plugin-hello-world')
219 expect(res).to.contain('0.0.17')
220 })
221
222 it('Should uninstall the plugin again', async function () {
223 const res = await cliCommand.execWithEnv(`${cmd} plugins uninstall --npm-name peertube-plugin-hello-world`)
224
225 expect(res).to.not.contain('peertube-plugin-hello-world')
226 })
210 }) 227 })
211 228
212 describe('Manage video redundancies', function () { 229 describe('Manage video redundancies', function () {