fix(test): fix test case of authz

This commit is contained in:
zhouzb 2021-09-16 13:55:22 +08:00
parent 43ce727632
commit 9df842eeb8
1 changed files with 3 additions and 3 deletions

View File

@ -148,8 +148,8 @@ set_special_configs(_App) ->
ok. ok.
init_per_testcase(t_api, Config) -> init_per_testcase(t_api, Config) ->
meck:new(emqx_plugin_libs_id, [non_strict, passthrough, no_history, no_link]), meck:new(emqx_misc, [non_strict, passthrough, no_history, no_link]),
meck:expect(emqx_plugin_libs_id, gen, fun() -> "fake" end), meck:expect(emqx_misc, gen_id, fun() -> "fake" end),
meck:new(emqx, [non_strict, passthrough, no_history, no_link]), meck:new(emqx, [non_strict, passthrough, no_history, no_link]),
meck:expect(emqx, get_config, fun([node, data_dir]) -> meck:expect(emqx, get_config, fun([node, data_dir]) ->
@ -162,7 +162,7 @@ init_per_testcase(t_api, Config) ->
init_per_testcase(_, Config) -> Config. init_per_testcase(_, Config) -> Config.
end_per_testcase(t_api, _Config) -> end_per_testcase(t_api, _Config) ->
meck:unload(emqx_plugin_libs_id), meck:unload(emqx_misc),
meck:unload(emqx), meck:unload(emqx),
ok; ok;
end_per_testcase(_, _Config) -> ok. end_per_testcase(_, _Config) -> ok.