diff options
Diffstat (limited to 'server/tests/plugins')
-rw-r--r-- | server/tests/plugins/id-and-pass-auth.ts | 69 | ||||
-rw-r--r-- | server/tests/plugins/index.ts | 1 |
2 files changed, 70 insertions, 0 deletions
diff --git a/server/tests/plugins/id-and-pass-auth.ts b/server/tests/plugins/id-and-pass-auth.ts new file mode 100644 index 000000000..5b4d1a1db --- /dev/null +++ b/server/tests/plugins/id-and-pass-auth.ts | |||
@@ -0,0 +1,69 @@ | |||
1 | /* eslint-disable @typescript-eslint/no-unused-expressions,@typescript-eslint/require-await */ | ||
2 | |||
3 | import 'mocha' | ||
4 | import { cleanupTests, flushAndRunServer, ServerInfo } from '../../../shared/extra-utils/server/servers' | ||
5 | import { getPluginTestPath, installPlugin, setAccessTokensToServers } from '../../../shared/extra-utils' | ||
6 | |||
7 | describe('Test id and pass auth plugins', 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('-id-pass-auth-one') | ||
20 | }) | ||
21 | |||
22 | await installPlugin({ | ||
23 | url: server.url, | ||
24 | accessToken: server.accessToken, | ||
25 | path: getPluginTestPath('-id-pass-auth-two') | ||
26 | }) | ||
27 | }) | ||
28 | |||
29 | it('Should not login', async function() { | ||
30 | |||
31 | }) | ||
32 | |||
33 | it('Should login Spyro, create the user and use the token', async function() { | ||
34 | |||
35 | }) | ||
36 | |||
37 | it('Should login Crash, create the user and use the token', async function() { | ||
38 | |||
39 | }) | ||
40 | |||
41 | it('Should login the first Laguna, create the user and use the token', async function() { | ||
42 | |||
43 | }) | ||
44 | |||
45 | it('Should update Crash profile', async function () { | ||
46 | |||
47 | }) | ||
48 | |||
49 | it('Should logout Crash', async function () { | ||
50 | |||
51 | // test token | ||
52 | }) | ||
53 | |||
54 | it('Should have logged the Crash logout', async function () { | ||
55 | |||
56 | }) | ||
57 | |||
58 | it('Should login Crash and keep the old existing profile', async function () { | ||
59 | |||
60 | }) | ||
61 | |||
62 | it('Should uninstall the plugin one and do not login existing Crash', async function () { | ||
63 | |||
64 | }) | ||
65 | |||
66 | after(async function () { | ||
67 | await cleanupTests([ server ]) | ||
68 | }) | ||
69 | }) | ||
diff --git a/server/tests/plugins/index.ts b/server/tests/plugins/index.ts index 1414e7e58..8aa30654a 100644 --- a/server/tests/plugins/index.ts +++ b/server/tests/plugins/index.ts | |||
@@ -1,4 +1,5 @@ | |||
1 | import './action-hooks' | 1 | import './action-hooks' |
2 | import './id-and-pass-auth' | ||
2 | import './filter-hooks' | 3 | import './filter-hooks' |
3 | import './translations' | 4 | import './translations' |
4 | import './video-constants' | 5 | import './video-constants' |