fix(ft): fix config update tests

This commit is contained in:
Ilya Averyanov 2023-04-05 18:18:03 +03:00
parent 6e50b168a0
commit 7bcb60a84a
2 changed files with 29 additions and 1 deletions

View File

@ -1,7 +1,14 @@
file_transfer { file_transfer {
storage { storage {
type = local type = local
segments {
root = "{{ platform_data_dir }}/file_transfer/segments"
gc {
interval = 60000
}
}
exporter { exporter {
root = "{{ platform_data_dir }}/file_transfer/exports"
type = local type = local
} }
} }

View File

@ -25,10 +25,31 @@
all() -> emqx_common_test_helpers:all(?MODULE). all() -> emqx_common_test_helpers:all(?MODULE).
init_per_suite(Config) -> init_per_suite(Config) ->
ok = emqx_common_test_helpers:start_apps([emqx_conf, emqx_ft]), _ = emqx_config:save_schema_mod_and_names(emqx_ft_schema),
ok = emqx_common_test_helpers:start_apps([emqx_conf, emqx_ft], fun set_special_config/1),
{ok, _} = emqx:update_config([rpc, port_discovery], manual), {ok, _} = emqx:update_config([rpc, port_discovery], manual),
Config. Config.
set_special_config(emqx_ft) ->
emqx_config:put(
[file_transfer],
#{
storage => #{
type => local,
segments => #{
gc => #{
interval => 60000
}
},
exporter => #{
type => local
}
}
}
);
set_special_config(_) ->
ok.
end_per_suite(_Config) -> end_per_suite(_Config) ->
ok = emqx_common_test_helpers:stop_apps([emqx_ft, emqx_conf]), ok = emqx_common_test_helpers:stop_apps([emqx_ft, emqx_conf]),
ok. ok.