feat(ft-api): do cleanup certs explicitly
This commit is contained in:
parent
a2b03716be
commit
a2eb658cd9
|
@ -297,10 +297,6 @@ t_persist_ssl_certfiles(Config) ->
|
||||||
?assertMatch(
|
?assertMatch(
|
||||||
{ok, _},
|
{ok, _},
|
||||||
emqx_ft_conf:update(mk_storage(true))
|
emqx_ft_conf:update(mk_storage(true))
|
||||||
),
|
|
||||||
?assertEqual(
|
|
||||||
[],
|
|
||||||
list_ssl_certfiles(Config)
|
|
||||||
).
|
).
|
||||||
|
|
||||||
mk_storage(Enabled) ->
|
mk_storage(Enabled) ->
|
||||||
|
|
|
@ -122,12 +122,8 @@ pre_config_update(_ProfileId, NewConfig, _OldConfig) ->
|
||||||
maybe(emqx_config:config())
|
maybe(emqx_config:config())
|
||||||
) ->
|
) ->
|
||||||
ok.
|
ok.
|
||||||
post_config_update(ProfileId, NewConfig, OldConfig) ->
|
post_config_update(_ProfileId, _NewConfig, _OldConfig) ->
|
||||||
emqx_connector_ssl:try_clear_certs(
|
ok.
|
||||||
mk_certs_dir(ProfileId),
|
|
||||||
maps:get(transport_options, emqx_maybe:define(NewConfig, #{}), undefined),
|
|
||||||
maps:get(transport_options, emqx_maybe:define(OldConfig, #{}), undefined)
|
|
||||||
).
|
|
||||||
|
|
||||||
mk_certs_dir(ProfileId) ->
|
mk_certs_dir(ProfileId) ->
|
||||||
filename:join([s3, profiles, ProfileId]).
|
filename:join([s3, profiles, ProfileId]).
|
||||||
|
|
Loading…
Reference in New Issue