mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Initialize ejabberd_access_permissions in elixir tests
This commit is contained in:
parent
98e0123ca4
commit
695d22ef95
@ -28,6 +28,7 @@ defmodule EjabberdAdminTest do
|
||||
# For some myterious reason, :ejabberd_commands.init mays
|
||||
# sometimes fails if module is not loaded before
|
||||
{:module, :ejabberd_commands} = Code.ensure_loaded(:ejabberd_commands)
|
||||
{:ok, _} = :ejabberd_access_permissions.start_link()
|
||||
:ejabberd_commands.init
|
||||
:ejabberd_admin.start
|
||||
:ok
|
||||
|
@ -50,6 +50,7 @@ defmodule EjabberdCommandsMockTest do
|
||||
:mnesia.start
|
||||
:ok = :jid.start
|
||||
:ok = :ejabberd_config.start(["domain1", "domain2"], [])
|
||||
{:ok, _} = :ejabberd_access_permissions.start_link()
|
||||
:ok = :acl.start
|
||||
EjabberdOauthMock.init
|
||||
on_exit fn -> :meck.unload end
|
||||
|
@ -30,6 +30,7 @@ defmodule EjabberdCommandsTest do
|
||||
:mnesia.start
|
||||
:stringprep.start
|
||||
:ok = :ejabberd_config.start(["localhost"], [])
|
||||
{:ok, _} = :ejabberd_access_permissions.start_link()
|
||||
|
||||
:ejabberd_commands.init
|
||||
:ok
|
||||
|
@ -45,6 +45,7 @@ defmodule EjabberdModAdminExtraTest do
|
||||
rescue
|
||||
_ -> :ok
|
||||
end
|
||||
{:ok, _} = :ejabberd_access_permissions.start_link()
|
||||
:ejabberd_commands.init
|
||||
:ok = :ejabberd_config.start([@domain], [])
|
||||
:mod_admin_extra.start(@domain, [])
|
||||
|
@ -46,6 +46,7 @@ defmodule ModHttpApiMockTest do
|
||||
:mnesia.start
|
||||
:stringprep.start
|
||||
:ejabberd_config.start([@domain], [])
|
||||
{:ok, _} = :ejabberd_access_permissions.start_link()
|
||||
:ejabberd_commands.init
|
||||
rescue
|
||||
_ -> :ok
|
||||
|
@ -31,6 +31,7 @@ defmodule ModHttpApiTest do
|
||||
:ok = :mnesia.start
|
||||
:stringprep.start
|
||||
:ok = :ejabberd_config.start(["localhost"], [])
|
||||
{:ok, _} = :ejabberd_access_permissions.start_link()
|
||||
:ok = :ejabberd_commands.init
|
||||
:ok = :ejabberd_commands.register_commands(cmds)
|
||||
on_exit fn ->
|
||||
|
Loading…
Reference in New Issue
Block a user