|
|
@@ -25,6 +25,11 @@
|
|
|
|
|
|
-import(proplists, [get_value/2]).
|
|
|
|
|
|
+-define(BASE_CONF, #{
|
|
|
+ <<"dealyed">> => <<"true">>,
|
|
|
+ <<"max_delayed_messages">> => <<"0">>
|
|
|
+}).
|
|
|
+
|
|
|
all() -> emqx_common_test_helpers:all(?MODULE).
|
|
|
|
|
|
init_per_suite(Config) ->
|
|
|
@@ -36,6 +41,9 @@ init_per_suite(Config) ->
|
|
|
emqx_common_test_helpers:deps_path(emqx_authz, "etc/acl.conf")
|
|
|
end
|
|
|
),
|
|
|
+ ok = emqx_common_test_helpers:load_config(emqx_modules_schema, jsx:encode(?BASE_CONF), #{
|
|
|
+ raw_with_default => true
|
|
|
+ }),
|
|
|
emqx_common_test_helpers:start_apps(
|
|
|
[emqx_conf, emqx_authn, emqx_authz, emqx_modules],
|
|
|
fun set_special_configs/1
|
|
|
@@ -144,7 +152,9 @@ init_per_testcase(t_exhook_info, Config) ->
|
|
|
{ok, _} = emqx_exhook_demo_svr:start(),
|
|
|
{ok, Sock} = gen_tcp:connect("localhost", 9000, [], 3000),
|
|
|
_ = gen_tcp:close(Sock),
|
|
|
- ok = emqx_common_test_helpers:load_config(emqx_exhook_schema, ExhookConf),
|
|
|
+ ok = emqx_common_test_helpers:load_config(emqx_exhook_schema, ExhookConf, #{
|
|
|
+ raw_with_default => true
|
|
|
+ }),
|
|
|
{ok, _} = application:ensure_all_started(emqx_exhook),
|
|
|
Config;
|
|
|
init_per_testcase(t_cluster_uuid, Config) ->
|
|
|
@@ -166,6 +176,9 @@ init_per_testcase(t_uuid_restored_from_file, Config) ->
|
|
|
%% clear the UUIDs in the DB
|
|
|
{atomic, ok} = mria:clear_table(emqx_telemetry),
|
|
|
emqx_common_test_helpers:stop_apps([emqx_conf, emqx_authn, emqx_authz, emqx_modules]),
|
|
|
+ ok = emqx_common_test_helpers:load_config(emqx_modules_schema, jsx:encode(?BASE_CONF), #{
|
|
|
+ raw_with_default => true
|
|
|
+ }),
|
|
|
emqx_common_test_helpers:start_apps(
|
|
|
[emqx_conf, emqx_authn, emqx_authz, emqx_modules],
|
|
|
fun set_special_configs/1
|
|
|
@@ -319,6 +332,9 @@ t_uuid_saved_to_file(_Config) ->
|
|
|
%% clear the UUIDs in the DB
|
|
|
{atomic, ok} = mria:clear_table(emqx_telemetry),
|
|
|
emqx_common_test_helpers:stop_apps([emqx_conf, emqx_authn, emqx_authz, emqx_modules]),
|
|
|
+ ok = emqx_common_test_helpers:load_config(emqx_modules_schema, jsx:encode(?BASE_CONF), #{
|
|
|
+ raw_with_default => true
|
|
|
+ }),
|
|
|
emqx_common_test_helpers:start_apps(
|
|
|
[emqx_conf, emqx_authn, emqx_authz, emqx_modules],
|
|
|
fun set_special_configs/1
|
|
|
@@ -841,6 +857,12 @@ setup_slave(Node) ->
|
|
|
(_) ->
|
|
|
ok
|
|
|
end,
|
|
|
+ ok = rpc:call(
|
|
|
+ Node,
|
|
|
+ emqx_common_test_helpers,
|
|
|
+ load_config,
|
|
|
+ [emqx_modules_schema, jsx:encode(?BASE_CONF), #{raw_with_default => true}]
|
|
|
+ ),
|
|
|
ok = rpc:call(
|
|
|
Node,
|
|
|
emqx_common_test_helpers,
|