25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

Fix elixir tests

This commit is contained in:
Paweł Chmielowski 2018-01-29 18:28:02 +01:00
parent d2974cf48a
commit ddf6076328
2 changed files with 14 additions and 9 deletions

View File

@ -110,7 +110,17 @@ start(Hosts, Opts) ->
[named_table, public, {read_concurrency, true}]), [named_table, public, {read_concurrency, true}]),
catch ets:new(ejabberd_db_modules, catch ets:new(ejabberd_db_modules,
[named_table, public, {read_concurrency, true}]), [named_table, public, {read_concurrency, true}]),
set_opts(set_hosts_in_options(Hosts, #state{opts = Opts})), UnixTime = p1_time_compat:system_time(seconds),
SharedKey = case erlang:get_cookie() of
nocookie ->
str:sha(randoms:get_string());
Cookie ->
str:sha(misc:atom_to_binary(Cookie))
end,
State1 = #state{opts = Opts},
State2 = set_option({node_start, global}, UnixTime, State1),
State3 = set_option({shared_key, global}, SharedKey, State2),
set_opts(set_hosts_in_options(Hosts, State3)),
ok. ok.
%% @doc Get the filename of the ejabberd configuration file. %% @doc Get the filename of the ejabberd configuration file.
@ -1057,12 +1067,7 @@ get_version() ->
-spec get_myhosts() -> [binary()]. -spec get_myhosts() -> [binary()].
get_myhosts() -> get_myhosts() ->
case get_option(hosts) of get_option(hosts).
V when is_list(V) ->
V;
_ ->
[]
end.
-spec get_mylang() -> binary(). -spec get_mylang() -> binary().

View File

@ -50,8 +50,8 @@ defmodule EjabberdModAdminExtraTest do
:acl.start_link :acl.start_link
:ejabberd_access_permissions.start_link() :ejabberd_access_permissions.start_link()
:ejabberd_commands.start_link :ejabberd_commands.start_link
:ok = :ejabberd_config.start([@domain], []) :ok = :ejabberd_config.start(["domain"], [])
:gen_mod.start_link :gen_mod.start_link
:mod_admin_extra.start(@domain, []) :mod_admin_extra.start(@domain, [])
:sel_application.start_app(:moka) :sel_application.start_app(:moka)
:ejabberd_hooks.start_link :ejabberd_hooks.start_link