25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Fix elixir tests

This commit is contained in:
Paweł Chmielowski 2017-04-21 12:03:05 +02:00 committed by Paweł Chmielowski
parent 02790b105e
commit 44ae6bcc83
6 changed files with 9 additions and 2 deletions

View File

@ -25,6 +25,7 @@ defmodule ACLTest do
setup_all do
:ok = :mnesia.start
:ejabberd_mnesia.start
{:ok, _} = :jid.start
:ejabberd_hooks.start_link
:stringprep.start

View File

@ -49,11 +49,13 @@ defmodule EjabberdCommandsMockTest do
_ -> :ok
end
:mnesia.start
:ejabberd_mnesia.start
{:ok, _} = :jid.start
:ejabberd_hooks.start_link
:ok = :ejabberd_config.start(["domain1", "domain2"], [])
{:ok, _} = :ejabberd_access_permissions.start_link()
{:ok, _} = :acl.start_link
:ejabberd_commands.start_link
EjabberdOauthMock.init
on_exit fn -> :meck.unload end
end
@ -61,8 +63,8 @@ defmodule EjabberdCommandsMockTest do
setup do
:meck.unload
:meck.new(@module, [:non_strict])
:mnesia.delete_table(:ejabberd_commands)
:ejabberd_commands.start_link
:mnesia.clear_table(:ejabberd_commands)
:ejabberd_commands.register_commands(:ejabberd_commands.get_commands_spec())
:ok
end

View File

@ -28,6 +28,7 @@ defmodule EjabberdCommandsTest do
setup_all do
:mnesia.start
:ejabberd_mnesia.start
:stringprep.start
:ok = :ejabberd_config.start(["localhost"], [])
{:ok, _} = :ejabberd_access_permissions.start_link()

View File

@ -27,6 +27,7 @@ defmodule EjabberdCyrsaslTest do
:ok = :ejabberd.start_app(:lager)
:p1_sha.load_nif()
:mnesia.start
:ejabberd_mnesia.start
:ok = start_module(:stringprep)
{:ok, _} = start_module(:jid)
:ok = :ejabberd_config.start(["domain1"], [])

View File

@ -44,6 +44,7 @@ defmodule ModHttpApiMockTest do
try do
:jid.start
:mnesia.start
:ejabberd_mnesia.start
:stringprep.start
:ejabberd_config.start([@domain], [])
{:ok, _} = :ejabberd_access_permissions.start_link()

View File

@ -29,6 +29,7 @@ defmodule ModHttpApiTest do
setup_all do
:ok = :mnesia.start
:ejabberd_mnesia.start
:stringprep.start
:ok = :ejabberd_config.start(["localhost"], [])
{:ok, _} = :ejabberd_access_permissions.start_link()