fix(test): remove emqx:get_env from lwm2m and telemetry
This commit is contained in:
parent
7c5caee89c
commit
419036bd9a
|
@ -88,10 +88,7 @@ stop() ->
|
|||
init([]) ->
|
||||
_ = ets:new(?LWM2M_OBJECT_DEF_TAB, [set, named_table, protected]),
|
||||
_ = ets:new(?LWM2M_OBJECT_NAME_TO_ID_TAB, [set, named_table, protected]),
|
||||
PluginsEtcDir = emqx:get_env(plugins_etc_dir),
|
||||
DefBaseDir = re:replace(PluginsEtcDir, "plugins", "lwm2m_xml", [{return, list}]),
|
||||
BaseDir = application:get_env(emqx_lwm2m, xml_dir, DefBaseDir),
|
||||
load(BaseDir),
|
||||
load(emqx_config:get([emqx_lwm2m, xml_dir])),
|
||||
{ok, #state{}}.
|
||||
|
||||
handle_call(_Request, _From, State) ->
|
||||
|
|
|
@ -37,15 +37,6 @@ init_per_suite(Config) ->
|
|||
end_per_suite(_Config) ->
|
||||
emqx_ct_helpers:stop_apps([emqx_modules]).
|
||||
|
||||
set_special_configs(emqx_modules) ->
|
||||
application:set_env(emqx, plugins_etc_dir,
|
||||
emqx_ct_helpers:deps_path(emqx_modules, "test")),
|
||||
Conf = #{},
|
||||
ok = file:write_file(filename:join(emqx:get_env(plugins_etc_dir), 'emqx_modules.conf'), jsx:encode(Conf)),
|
||||
ok;
|
||||
set_special_configs(_App) ->
|
||||
ok.
|
||||
|
||||
t_uuid(_) ->
|
||||
UUID = emqx_mod_telemetry:generate_uuid(),
|
||||
Parts = binary:split(UUID, <<"-">>, [global, trim]),
|
||||
|
|
Loading…
Reference in New Issue