X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Ftests%2Fexternal-plugins%2Fauth-ldap.ts;h=0d4edbee0fc17118f9bdd2b0083ce9b6a931722b;hb=ae2abfd3aed3e75d39a316b49b914d187faa7475;hp=e4eae7e8c047b858154fcb598ada2838913609ed;hpb=9c6327f803aaf4200672f1fc40b2f43786daca47;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/tests/external-plugins/auth-ldap.ts b/server/tests/external-plugins/auth-ldap.ts index e4eae7e8c..0d4edbee0 100644 --- a/server/tests/external-plugins/auth-ldap.ts +++ b/server/tests/external-plugins/auth-ldap.ts @@ -3,17 +3,7 @@ import 'mocha' import { expect } from 'chai' import { User } from '@shared/models/users/user.model' -import { - blockUser, - getMyUserInformation, - installPlugin, - setAccessTokensToServers, - unblockUser, - uninstallPlugin, - updatePluginSettings, - uploadVideo, - userLogin -} from '../../../shared/extra-utils' +import { blockUser, getMyUserInformation, setAccessTokensToServers, unblockUser, uploadVideo, userLogin } from '../../../shared/extra-utils' import { cleanupTests, flushAndRunServer, ServerInfo } from '../../../shared/extra-utils/server/servers' describe('Official plugin auth-ldap', function () { @@ -27,11 +17,7 @@ describe('Official plugin auth-ldap', function () { server = await flushAndRunServer(1) await setAccessTokensToServers([ server ]) - await installPlugin({ - url: server.url, - accessToken: server.accessToken, - npmName: 'peertube-plugin-auth-ldap' - }) + await server.pluginsCommand.install({ npmName: 'peertube-plugin-auth-ldap' }) }) it('Should not login with without LDAP settings', async function () { @@ -39,9 +25,7 @@ describe('Official plugin auth-ldap', function () { }) it('Should not login with bad LDAP settings', async function () { - await updatePluginSettings({ - url: server.url, - accessToken: server.accessToken, + await server.pluginsCommand.updateSettings({ npmName: 'peertube-plugin-auth-ldap', settings: { 'bind-credentials': 'GoodNewsEveryone', @@ -59,9 +43,7 @@ describe('Official plugin auth-ldap', function () { }) it('Should not login with good LDAP settings but wrong username/password', async function () { - await updatePluginSettings({ - url: server.url, - accessToken: server.accessToken, + await server.pluginsCommand.updateSettings({ npmName: 'peertube-plugin-auth-ldap', settings: { 'bind-credentials': 'GoodNewsEveryone', @@ -114,7 +96,7 @@ describe('Official plugin auth-ldap', function () { }) it('Should not login if the plugin is uninstalled', async function () { - await uninstallPlugin({ url: server.url, accessToken: server.accessToken, npmName: 'peertube-plugin-auth-ldap' }) + await server.pluginsCommand.uninstall({ npmName: 'peertube-plugin-auth-ldap' }) await userLogin(server, { username: 'fry@planetexpress.com', password: 'fry' }, 400) })