fix(deps): fix ee430 problem when remove resources

This commit is contained in:
wwhai 2021-04-30 18:09:33 +08:00
parent 171933301a
commit a9b674c587
1 changed files with 2 additions and 9 deletions

View File

@ -51,11 +51,6 @@ end_per_suite(Cfg) ->
get_data_path() -> get_data_path() ->
emqx_ct_helpers:deps_path(emqx_management, "test/emqx_bridge_mqtt_data_export_import_SUITE_data/"). emqx_ct_helpers:deps_path(emqx_management, "test/emqx_bridge_mqtt_data_export_import_SUITE_data/").
remove_resource(Id) ->
timer:sleep(1000),
emqx_rule_registry:remove_resource(Id),
emqx_rule_registry:remove_resource_params(Id).
import(FilePath, Version) -> import(FilePath, Version) ->
ok = emqx_mgmt_data_backup:import(get_data_path() ++ "/" ++ FilePath, <<"{}">>), ok = emqx_mgmt_data_backup:import(get_data_path() ++ "/" ++ FilePath, <<"{}">>),
lists:foreach(fun(#resource{id = Id, config = Config} = _Resource) -> lists:foreach(fun(#resource{id = Id, config = Config} = _Resource) ->
@ -63,12 +58,10 @@ import(FilePath, Version) ->
case Id of case Id of
<<"bridge">> -> <<"bridge">> ->
test_utils:resource_is_alive(Id), test_utils:resource_is_alive(Id),
handle_config(Config, Version, bridge), handle_config(Config, Version, bridge);
remove_resource(Id);
<<"rpc">> -> <<"rpc">> ->
test_utils:resource_is_alive(Id), test_utils:resource_is_alive(Id),
handle_config(Config, Version, rpc), handle_config(Config, Version, rpc);
remove_resource(Id);
_ -> ok _ -> ok
end end
end, emqx_rule_registry:get_resources()). end, emqx_rule_registry:get_resources()).