aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/plugins
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-04-22 16:07:04 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-05-04 16:21:39 +0200
commit7fed637506043e4432cbebe041ada0625171cceb (patch)
tree07f174e17c4b4a0b3d43a0fa6944865c06234338 /server/tests/plugins
parent8d4197637868d5cde49434e937186b57e40f4b2b (diff)
downloadPeerTube-7fed637506043e4432cbebe041ada0625171cceb.tar.gz
PeerTube-7fed637506043e4432cbebe041ada0625171cceb.tar.zst
PeerTube-7fed637506043e4432cbebe041ada0625171cceb.zip
Begin auth plugin support
Diffstat (limited to 'server/tests/plugins')
-rw-r--r--server/tests/plugins/id-and-pass-auth.ts69
-rw-r--r--server/tests/plugins/index.ts1
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
3import 'mocha'
4import { cleanupTests, flushAndRunServer, ServerInfo } from '../../../shared/extra-utils/server/servers'
5import { getPluginTestPath, installPlugin, setAccessTokensToServers } from '../../../shared/extra-utils'
6
7describe('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 @@
1import './action-hooks' 1import './action-hooks'
2import './id-and-pass-auth'
2import './filter-hooks' 3import './filter-hooks'
3import './translations' 4import './translations'
4import './video-constants' 5import './video-constants'