Change a way that tests start ejabberd
This commit is contained in:
parent
d47bc1efdb
commit
aee53332bf
|
@ -65,13 +65,13 @@ init_per_suite(Config) ->
|
||||||
start_ejabberd(Config) ->
|
start_ejabberd(Config) ->
|
||||||
case proplists:get_value(backends, Config) of
|
case proplists:get_value(backends, Config) of
|
||||||
all ->
|
all ->
|
||||||
ok = application:start(ejabberd, transient);
|
{ok, _} = application:ensure_all_started(ejabberd, transient);
|
||||||
Backends when is_list(Backends) ->
|
Backends when is_list(Backends) ->
|
||||||
Hosts = lists:map(fun(Backend) -> Backend ++ ".localhost" end, Backends),
|
Hosts = lists:map(fun(Backend) -> Backend ++ ".localhost" end, Backends),
|
||||||
application:load(ejabberd),
|
application:load(ejabberd),
|
||||||
AllHosts = Hosts ++ ["localhost"], %% We always need localhost for the generic no_db tests
|
AllHosts = Hosts ++ ["localhost"], %% We always need localhost for the generic no_db tests
|
||||||
application:set_env(ejabberd, hosts, AllHosts),
|
application:set_env(ejabberd, hosts, AllHosts),
|
||||||
ok = application:start(ejabberd, transient)
|
{ok, _} = application:ensure_all_started(ejabberd, transient)
|
||||||
end.
|
end.
|
||||||
|
|
||||||
end_per_suite(_Config) ->
|
end_per_suite(_Config) ->
|
||||||
|
|
Loading…
Reference in New Issue