Merge branch 'bugfix/ldap-test-fix' into 'develop'
test: fix defective ldap setup/teardown See merge request pleroma/pleroma!943
This commit is contained in:
commit
f58d47d6f7
@ -11,15 +11,17 @@ defmodule Pleroma.Web.OAuth.LDAPAuthorizationTest do
|
|||||||
import Mock
|
import Mock
|
||||||
|
|
||||||
setup_all do
|
setup_all do
|
||||||
ldap_authenticator = Pleroma.Config.get([Pleroma.Web.Auth.Authenticator])
|
ldap_authenticator =
|
||||||
|
Pleroma.Config.get(Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.PleromaAuthenticator)
|
||||||
|
|
||||||
ldap_enabled = Pleroma.Config.get([:ldap, :enabled])
|
ldap_enabled = Pleroma.Config.get([:ldap, :enabled])
|
||||||
|
|
||||||
on_exit(fn ->
|
on_exit(fn ->
|
||||||
Pleroma.Config.put([Pleroma.Web.Auth.Authenticator], ldap_authenticator)
|
Pleroma.Config.put(Pleroma.Web.Auth.Authenticator, ldap_authenticator)
|
||||||
Pleroma.Config.put([:ldap, :enabled], ldap_enabled)
|
Pleroma.Config.put([:ldap, :enabled], ldap_enabled)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Pleroma.Config.put([Pleroma.Web.Auth.Authenticator], Pleroma.Web.Auth.LDAPAuthenticator)
|
Pleroma.Config.put(Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.LDAPAuthenticator)
|
||||||
Pleroma.Config.put([:ldap, :enabled], true)
|
Pleroma.Config.put([:ldap, :enabled], true)
|
||||||
|
|
||||||
:ok
|
:ok
|
||||||
|
Loading…
Reference in New Issue
Block a user