From a2eb658cd987f290f3072246db0eac20709def84 Mon Sep 17 00:00:00 2001 From: Ilya Averyanov Date: Fri, 9 Jun 2023 10:34:07 +0300 Subject: [PATCH] feat(ft-api): do cleanup certs explicitly --- apps/emqx_ft/test/emqx_ft_conf_SUITE.erl | 4 ---- apps/emqx_s3/src/emqx_s3.erl | 8 ++------ 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/apps/emqx_ft/test/emqx_ft_conf_SUITE.erl b/apps/emqx_ft/test/emqx_ft_conf_SUITE.erl index f61283eae..fc4391cde 100644 --- a/apps/emqx_ft/test/emqx_ft_conf_SUITE.erl +++ b/apps/emqx_ft/test/emqx_ft_conf_SUITE.erl @@ -297,10 +297,6 @@ t_persist_ssl_certfiles(Config) -> ?assertMatch( {ok, _}, emqx_ft_conf:update(mk_storage(true)) - ), - ?assertEqual( - [], - list_ssl_certfiles(Config) ). mk_storage(Enabled) -> diff --git a/apps/emqx_s3/src/emqx_s3.erl b/apps/emqx_s3/src/emqx_s3.erl index 3fa3c4b71..be91a19d2 100644 --- a/apps/emqx_s3/src/emqx_s3.erl +++ b/apps/emqx_s3/src/emqx_s3.erl @@ -122,12 +122,8 @@ pre_config_update(_ProfileId, NewConfig, _OldConfig) -> maybe(emqx_config:config()) ) -> ok. -post_config_update(ProfileId, NewConfig, OldConfig) -> - emqx_connector_ssl:try_clear_certs( - mk_certs_dir(ProfileId), - maps:get(transport_options, emqx_maybe:define(NewConfig, #{}), undefined), - maps:get(transport_options, emqx_maybe:define(OldConfig, #{}), undefined) - ). +post_config_update(_ProfileId, _NewConfig, _OldConfig) -> + ok. mk_certs_dir(ProfileId) -> filename:join([s3, profiles, ProfileId]).