|
|
@@ -83,9 +83,8 @@ t_reload_aclfile_and_cleanall(Config) ->
|
|
|
Path = filename:join([testdir(proplists:get_value(data_dir, Config)), "acl2.conf"]),
|
|
|
ok = file:write_file(Path, <<"{deny, all}.">>),
|
|
|
OldPath = emqx:get_env(acl_file),
|
|
|
- application:set_env(emqx, acl_file, Path),
|
|
|
-
|
|
|
- emqx_mod_acl_internal:reload([]),
|
|
|
+ % application:set_env(emqx, acl_file, Path),
|
|
|
+ emqx_mod_acl_internal:reload([{acl_file, Path}]),
|
|
|
|
|
|
?assert(length(gen_server:call(ClientPid, list_acl_cache)) == 0),
|
|
|
{ok, PktId2} = emqtt:publish(Client, <<"t1">>, <<"{\"x\":1}">>, qos1),
|
|
|
@@ -99,7 +98,7 @@ t_reload_aclfile_and_cleanall(Config) ->
|
|
|
end,
|
|
|
application:set_env(emqx, acl_file, OldPath),
|
|
|
file:delete(Path),
|
|
|
- emqx_mod_acl_internal:reload([]),
|
|
|
+ emqx_mod_acl_internal:reload([{acl_file, OldPath}]),
|
|
|
emqtt:stop(Client).
|
|
|
|
|
|
%% @private
|