diff options
author | Chocobozzz <me@florianbigard.com> | 2021-07-07 11:51:09 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-07-20 15:27:17 +0200 |
commit | 65e6e2602c0d5521f3a6740f7469bb92830ecb53 (patch) | |
tree | f89024ffff1dafb0281ee2fe028e89b95101bd44 /server/tests/plugins/external-auth.ts | |
parent | bc8090411ddaa8d742ce4de3c83f9dba7bc18e2a (diff) | |
download | PeerTube-65e6e2602c0d5521f3a6740f7469bb92830ecb53.tar.gz PeerTube-65e6e2602c0d5521f3a6740f7469bb92830ecb53.tar.zst PeerTube-65e6e2602c0d5521f3a6740f7469bb92830ecb53.zip |
Introduce config command
Diffstat (limited to 'server/tests/plugins/external-auth.ts')
-rw-r--r-- | server/tests/plugins/external-auth.ts | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/server/tests/plugins/external-auth.ts b/server/tests/plugins/external-auth.ts index 424302786..09a107ca2 100644 --- a/server/tests/plugins/external-auth.ts +++ b/server/tests/plugins/external-auth.ts | |||
@@ -8,7 +8,6 @@ import { | |||
8 | createUser, | 8 | createUser, |
9 | decodeQueryString, | 9 | decodeQueryString, |
10 | flushAndRunServer, | 10 | flushAndRunServer, |
11 | getConfig, | ||
12 | getMyUserInformation, | 11 | getMyUserInformation, |
13 | loginUsingExternalToken, | 12 | loginUsingExternalToken, |
14 | logout, | 13 | logout, |
@@ -21,7 +20,7 @@ import { | |||
21 | wait, | 20 | wait, |
22 | waitUntilLog | 21 | waitUntilLog |
23 | } from '@shared/extra-utils' | 22 | } from '@shared/extra-utils' |
24 | import { ServerConfig, User, UserRole } from '@shared/models' | 23 | import { User, UserRole } from '@shared/models' |
25 | 24 | ||
26 | async function loginExternal (options: { | 25 | async function loginExternal (options: { |
27 | server: ServerInfo | 26 | server: ServerInfo |
@@ -78,9 +77,7 @@ describe('Test external auth plugins', function () { | |||
78 | }) | 77 | }) |
79 | 78 | ||
80 | it('Should display the correct configuration', async function () { | 79 | it('Should display the correct configuration', async function () { |
81 | const res = await getConfig(server.url) | 80 | const config = await server.configCommand.getConfig() |
82 | |||
83 | const config: ServerConfig = res.body | ||
84 | 81 | ||
85 | const auths = config.plugin.registeredExternalAuths | 82 | const auths = config.plugin.registeredExternalAuths |
86 | expect(auths).to.have.lengthOf(8) | 83 | expect(auths).to.have.lengthOf(8) |
@@ -288,9 +285,7 @@ describe('Test external auth plugins', function () { | |||
288 | }) | 285 | }) |
289 | 286 | ||
290 | it('Should have disabled this auth', async function () { | 287 | it('Should have disabled this auth', async function () { |
291 | const res = await getConfig(server.url) | 288 | const config = await server.configCommand.getConfig() |
292 | |||
293 | const config: ServerConfig = res.body | ||
294 | 289 | ||
295 | const auths = config.plugin.registeredExternalAuths | 290 | const auths = config.plugin.registeredExternalAuths |
296 | expect(auths).to.have.lengthOf(7) | 291 | expect(auths).to.have.lengthOf(7) |
@@ -354,9 +349,7 @@ describe('Test external auth plugins', function () { | |||
354 | }) | 349 | }) |
355 | 350 | ||
356 | it('Should display the correct configuration', async function () { | 351 | it('Should display the correct configuration', async function () { |
357 | const res = await getConfig(server.url) | 352 | const config = await server.configCommand.getConfig() |
358 | |||
359 | const config: ServerConfig = res.body | ||
360 | 353 | ||
361 | const auths = config.plugin.registeredExternalAuths | 354 | const auths = config.plugin.registeredExternalAuths |
362 | expect(auths).to.have.lengthOf(6) | 355 | expect(auths).to.have.lengthOf(6) |