Add more test cases for emqx_zone

This commit is contained in:
zhanghongtong 2019-10-29 15:43:09 +08:00
parent 971a361ea9
commit 3009eeb270
1 changed files with 9 additions and 0 deletions

View File

@ -100,3 +100,12 @@ t_uncovered_func(_) ->
ok = Pid ! ok,
emqx_zone:stop().
t_frame_options(_) ->
?assertMatch(#{strict_mode := _, max_size := _ }, emqx_zone:frame_options(zone)).
t_check_oom(_) ->
{ok, _} = emqx_zone:start_link(),
application:set_env(emqx, zones, [{zone, ?ENVS}]),
ok = emqx_zone:force_reload(),
?assertEqual(ok, emqx_zone:check_oom(zone, fun() -> ok end)),
emqx_zone:stop().