diff options
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 | }) | ||