test(modules): test starting by default
This commit is contained in:
parent
49b7d870e0
commit
d6bbfdcd51
|
@ -28,7 +28,6 @@ all() -> emqx_ct:all(?MODULE).
|
|||
%%--------------------------------------------------------------------
|
||||
|
||||
t_start(_) ->
|
||||
{ok, _} = emqx_mod_sup:start_link(),
|
||||
?assertEqual([], supervisor:which_children(emqx_mod_sup)).
|
||||
|
||||
t_start_child(_) ->
|
||||
|
@ -41,7 +40,6 @@ t_start_child(_) ->
|
|||
type => worker,
|
||||
modules => [Mod]},
|
||||
|
||||
{ok, _} = emqx_mod_sup:start_link(),
|
||||
ok = emqx_mod_sup:start_child(Mod, worker),
|
||||
?assertError({already_started, _}, emqx_mod_sup:start_child(Spec)),
|
||||
|
||||
|
|
|
@ -127,6 +127,19 @@ t_modules_cmd(_) ->
|
|||
"Module emqx_mod_presence unloaded successfully.\n"),
|
||||
unmock_print().
|
||||
|
||||
%% For: https://github.com/emqx/emqx/issues/4511
|
||||
t_join_cluster(_) ->
|
||||
%% Started by emqx application
|
||||
{error, {already_started, emqx_modules}} = application:start(emqx_modules),
|
||||
%% After clustered
|
||||
emqx:shutdown(),
|
||||
emqx:reboot(),
|
||||
{error,{already_started,emqx_modules}} = application:start(emqx_modules),
|
||||
%% After emqx reboot, we should not interfere with other tests
|
||||
_ = end_per_suite([]),
|
||||
_ = init_per_suite([]),
|
||||
ok.
|
||||
|
||||
mock_print() ->
|
||||
catch meck:unload(emqx_ctl),
|
||||
meck:new(emqx_ctl, [non_strict, passthrough]),
|
||||
|
|
Loading…
Reference in New Issue