mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Fix elixir tests
This commit is contained in:
parent
d2974cf48a
commit
ddf6076328
@ -110,7 +110,17 @@ start(Hosts, Opts) ->
|
||||
[named_table, public, {read_concurrency, true}]),
|
||||
catch ets:new(ejabberd_db_modules,
|
||||
[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.
|
||||
|
||||
%% @doc Get the filename of the ejabberd configuration file.
|
||||
@ -1057,12 +1067,7 @@ get_version() ->
|
||||
-spec get_myhosts() -> [binary()].
|
||||
|
||||
get_myhosts() ->
|
||||
case get_option(hosts) of
|
||||
V when is_list(V) ->
|
||||
V;
|
||||
_ ->
|
||||
[]
|
||||
end.
|
||||
get_option(hosts).
|
||||
|
||||
-spec get_mylang() -> binary().
|
||||
|
||||
|
@ -50,8 +50,8 @@ defmodule EjabberdModAdminExtraTest do
|
||||
:acl.start_link
|
||||
:ejabberd_access_permissions.start_link()
|
||||
:ejabberd_commands.start_link
|
||||
:ok = :ejabberd_config.start([@domain], [])
|
||||
:gen_mod.start_link
|
||||
:ok = :ejabberd_config.start(["domain"], [])
|
||||
:gen_mod.start_link
|
||||
:mod_admin_extra.start(@domain, [])
|
||||
:sel_application.start_app(:moka)
|
||||
:ejabberd_hooks.start_link
|
||||
|
Loading…
Reference in New Issue
Block a user