aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/plugins/id-and-pass-auth.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-07 11:51:09 +0200
committerChocobozzz <me@florianbigard.com>2021-07-20 15:27:17 +0200
commit65e6e2602c0d5521f3a6740f7469bb92830ecb53 (patch)
treef89024ffff1dafb0281ee2fe028e89b95101bd44 /server/tests/plugins/id-and-pass-auth.ts
parentbc8090411ddaa8d742ce4de3c83f9dba7bc18e2a (diff)
downloadPeerTube-65e6e2602c0d5521f3a6740f7469bb92830ecb53.tar.gz
PeerTube-65e6e2602c0d5521f3a6740f7469bb92830ecb53.tar.zst
PeerTube-65e6e2602c0d5521f3a6740f7469bb92830ecb53.zip
Introduce config command
Diffstat (limited to 'server/tests/plugins/id-and-pass-auth.ts')
-rw-r--r--server/tests/plugins/id-and-pass-auth.ts15
1 files changed, 4 insertions, 11 deletions
diff --git a/server/tests/plugins/id-and-pass-auth.ts b/server/tests/plugins/id-and-pass-auth.ts
index 545968040..99de28d3f 100644
--- a/server/tests/plugins/id-and-pass-auth.ts
+++ b/server/tests/plugins/id-and-pass-auth.ts
@@ -5,7 +5,6 @@ import { expect } from 'chai'
5import { 5import {
6 cleanupTests, 6 cleanupTests,
7 flushAndRunServer, 7 flushAndRunServer,
8 getConfig,
9 getMyUserInformation, 8 getMyUserInformation,
10 getUsersList, 9 getUsersList,
11 login, 10 login,
@@ -19,7 +18,7 @@ import {
19 wait, 18 wait,
20 waitUntilLog 19 waitUntilLog
21} from '@shared/extra-utils' 20} from '@shared/extra-utils'
22import { ServerConfig, User, UserRole } from '@shared/models' 21import { User, UserRole } from '@shared/models'
23 22
24describe('Test id and pass auth plugins', function () { 23describe('Test id and pass auth plugins', function () {
25 let server: ServerInfo 24 let server: ServerInfo
@@ -42,9 +41,7 @@ describe('Test id and pass auth plugins', function () {
42 }) 41 })
43 42
44 it('Should display the correct configuration', async function () { 43 it('Should display the correct configuration', async function () {
45 const res = await getConfig(server.url) 44 const config = await server.configCommand.getConfig()
46
47 const config: ServerConfig = res.body
48 45
49 const auths = config.plugin.registeredIdAndPassAuths 46 const auths = config.plugin.registeredIdAndPassAuths
50 expect(auths).to.have.lengthOf(8) 47 expect(auths).to.have.lengthOf(8)
@@ -190,9 +187,7 @@ describe('Test id and pass auth plugins', function () {
190 }) 187 })
191 188
192 it('Should have disabled this auth', async function () { 189 it('Should have disabled this auth', async function () {
193 const res = await getConfig(server.url) 190 const config = await server.configCommand.getConfig()
194
195 const config: ServerConfig = res.body
196 191
197 const auths = config.plugin.registeredIdAndPassAuths 192 const auths = config.plugin.registeredIdAndPassAuths
198 expect(auths).to.have.lengthOf(7) 193 expect(auths).to.have.lengthOf(7)
@@ -208,9 +203,7 @@ describe('Test id and pass auth plugins', function () {
208 }) 203 })
209 204
210 it('Should display the correct configuration', async function () { 205 it('Should display the correct configuration', async function () {
211 const res = await getConfig(server.url) 206 const config = await server.configCommand.getConfig()
212
213 const config: ServerConfig = res.body
214 207
215 const auths = config.plugin.registeredIdAndPassAuths 208 const auths = config.plugin.registeredIdAndPassAuths
216 expect(auths).to.have.lengthOf(6) 209 expect(auths).to.have.lengthOf(6)