aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/plugins/external-auth.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-16 09:47:51 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:18 +0200
commit254d3579f5338f5fd775c17d15cdfc37078bcfb4 (patch)
treeeaeb13fda16c16e98cd6991d202b0ca6a4cbdb63 /server/tests/plugins/external-auth.ts
parent89d241a79c262b9775c233b73cff080043ebb5e6 (diff)
downloadPeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.gz
PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.tar.zst
PeerTube-254d3579f5338f5fd775c17d15cdfc37078bcfb4.zip
Use an object to represent a server
Diffstat (limited to 'server/tests/plugins/external-auth.ts')
-rw-r--r--server/tests/plugins/external-auth.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/tests/plugins/external-auth.ts b/server/tests/plugins/external-auth.ts
index 48f942f7f..c0834a14c 100644
--- a/server/tests/plugins/external-auth.ts
+++ b/server/tests/plugins/external-auth.ts
@@ -6,16 +6,16 @@ import { HttpStatusCode } from '@shared/core-utils'
6import { 6import {
7 cleanupTests, 7 cleanupTests,
8 decodeQueryString, 8 decodeQueryString,
9 flushAndRunServer, 9 createSingleServer,
10 PluginsCommand, 10 PluginsCommand,
11 ServerInfo, 11 PeerTubeServer,
12 setAccessTokensToServers, 12 setAccessTokensToServers,
13 wait 13 wait
14} from '@shared/extra-utils' 14} from '@shared/extra-utils'
15import { UserRole } from '@shared/models' 15import { UserRole } from '@shared/models'
16 16
17async function loginExternal (options: { 17async function loginExternal (options: {
18 server: ServerInfo 18 server: PeerTubeServer
19 npmName: string 19 npmName: string
20 authName: string 20 authName: string
21 username: string 21 username: string
@@ -46,7 +46,7 @@ async function loginExternal (options: {
46} 46}
47 47
48describe('Test external auth plugins', function () { 48describe('Test external auth plugins', function () {
49 let server: ServerInfo 49 let server: PeerTubeServer
50 50
51 let cyanAccessToken: string 51 let cyanAccessToken: string
52 let cyanRefreshToken: string 52 let cyanRefreshToken: string
@@ -59,7 +59,7 @@ describe('Test external auth plugins', function () {
59 before(async function () { 59 before(async function () {
60 this.timeout(30000) 60 this.timeout(30000)
61 61
62 server = await flushAndRunServer(1) 62 server = await createSingleServer(1)
63 await setAccessTokensToServers([ server ]) 63 await setAccessTokensToServers([ server ])
64 64
65 for (const suffix of [ 'one', 'two', 'three' ]) { 65 for (const suffix of [ 'one', 'two', 'three' ]) {