diff options
author | Chocobozzz <me@florianbigard.com> | 2020-05-04 09:44:00 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-05-04 16:21:39 +0200 |
commit | 97b65ce58aaacbbfec2291f18fb95a9da9eb5263 (patch) | |
tree | 98779224aabe3f5c5eefbcde46b0a50ae48e761c /server/tests/plugins | |
parent | 15b4bcdf04db86c655ae16d4832ae2a8f0e55829 (diff) | |
download | PeerTube-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.ts | 1 | ||||
-rw-r--r-- | server/tests/plugins/plugin-storage.ts | 30 |
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' | |||
6 | import './video-constants' | 6 | import './video-constants' |
7 | import './plugin-helpers' | 7 | import './plugin-helpers' |
8 | import './plugin-router' | 8 | import './plugin-router' |
9 | import './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 | |||
3 | import 'mocha' | ||
4 | import { getPluginTestPath, installPlugin, setAccessTokensToServers } from '../../../shared/extra-utils' | ||
5 | import { cleanupTests, flushAndRunServer, ServerInfo, waitUntilLog } from '../../../shared/extra-utils/server/servers' | ||
6 | |||
7 | describe('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 | }) | ||