test: recover boot_modules app env after test
This commit is contained in:
parent
86b4d4d23b
commit
33be7672ad
|
@ -128,6 +128,7 @@ all() ->
|
||||||
|
|
||||||
init_per_suite(Config) ->
|
init_per_suite(Config) ->
|
||||||
application:set_env(ekka, strict_mode, true),
|
application:set_env(ekka, strict_mode, true),
|
||||||
|
emqx_common_test_helpers:boot_modules(all),
|
||||||
emqx_common_test_helpers:start_apps([]),
|
emqx_common_test_helpers:start_apps([]),
|
||||||
Config.
|
Config.
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
all() -> emqx_common_test_helpers:all(?MODULE).
|
all() -> emqx_common_test_helpers:all(?MODULE).
|
||||||
|
|
||||||
t_is_enabled(_) ->
|
t_is_enabled(_) ->
|
||||||
|
try
|
||||||
ok = application:set_env(emqx, boot_modules, all),
|
ok = application:set_env(emqx, boot_modules, all),
|
||||||
?assert(emqx_boot:is_enabled(router)),
|
?assert(emqx_boot:is_enabled(router)),
|
||||||
?assert(emqx_boot:is_enabled(broker)),
|
?assert(emqx_boot:is_enabled(broker)),
|
||||||
|
@ -39,4 +40,7 @@ t_is_enabled(_) ->
|
||||||
ok = application:set_env(emqx, boot_modules, [router, broker, listeners]),
|
ok = application:set_env(emqx, boot_modules, [router, broker, listeners]),
|
||||||
?assert(emqx_boot:is_enabled(router)),
|
?assert(emqx_boot:is_enabled(router)),
|
||||||
?assert(emqx_boot:is_enabled(broker)),
|
?assert(emqx_boot:is_enabled(broker)),
|
||||||
?assert(emqx_boot:is_enabled(listeners)).
|
?assert(emqx_boot:is_enabled(listeners))
|
||||||
|
after
|
||||||
|
application:set_env(emqx, boot_modules, all)
|
||||||
|
end.
|
||||||
|
|
Loading…
Reference in New Issue