aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/plugins
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-05-04 09:44:00 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-05-04 16:21:39 +0200
commit97b65ce58aaacbbfec2291f18fb95a9da9eb5263 (patch)
tree98779224aabe3f5c5eefbcde46b0a50ae48e761c /server/tests/plugins
parent15b4bcdf04db86c655ae16d4832ae2a8f0e55829 (diff)
downloadPeerTube-97b65ce58aaacbbfec2291f18fb95a9da9eb5263.tar.gz
PeerTube-97b65ce58aaacbbfec2291f18fb95a9da9eb5263.tar.zst
PeerTube-97b65ce58aaacbbfec2291f18fb95a9da9eb5263.zip
Fix plugin storeData
Diffstat (limited to 'server/tests/plugins')
-rw-r--r--server/tests/plugins/index.ts1
-rw-r--r--server/tests/plugins/plugin-storage.ts30
2 files changed, 31 insertions, 0 deletions
diff --git a/server/tests/plugins/index.ts b/server/tests/plugins/index.ts
index d2bd69131..39c4c958a 100644
--- a/server/tests/plugins/index.ts
+++ b/server/tests/plugins/index.ts
@@ -6,3 +6,4 @@ import './translations'
6import './video-constants' 6import './video-constants'
7import './plugin-helpers' 7import './plugin-helpers'
8import './plugin-router' 8import './plugin-router'
9import './plugin-storage'
diff --git a/server/tests/plugins/plugin-storage.ts b/server/tests/plugins/plugin-storage.ts
new file mode 100644
index 000000000..356692eb9
--- /dev/null
+++ b/server/tests/plugins/plugin-storage.ts
@@ -0,0 +1,30 @@
1/* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */
2
3import 'mocha'
4import { getPluginTestPath, installPlugin, setAccessTokensToServers } from '../../../shared/extra-utils'
5import { cleanupTests, flushAndRunServer, ServerInfo, waitUntilLog } from '../../../shared/extra-utils/server/servers'
6
7describe('Test plugin storage', function () {
8 let server: ServerInfo
9
10 before(async function () {
11 this.timeout(30000)
12
13 server = await flushAndRunServer(1)
14 await setAccessTokensToServers([ server ])
15
16 await installPlugin({
17 url: server.url,
18 accessToken: server.accessToken,
19 path: getPluginTestPath('-six')
20 })
21 })
22
23 it('Should correctly store a subkey', async function () {
24 await waitUntilLog(server, 'superkey stored value is toto')
25 })
26
27 after(async function () {
28 await cleanupTests([ server ])
29 })
30})