test: fix emqx_config_SUITE

This commit is contained in:
Zaiming Shi 2021-10-22 07:46:57 +02:00 committed by x1001100011
parent 54223e4fe6
commit 92d5f4b3b2
1 changed files with 6 additions and 3 deletions

View File

@ -36,6 +36,7 @@ t_fill_default_values(_) ->
<<"perf">> => #{}, <<"perf">> => #{},
<<"route_batch_clean">> => false} <<"route_batch_clean">> => false}
}, },
WithDefaults = emqx_config:fill_defaults(Conf),
?assertMatch(#{<<"broker">> := ?assertMatch(#{<<"broker">> :=
#{<<"enable_session_registry">> := true, #{<<"enable_session_registry">> := true,
<<"perf">> := <<"perf">> :=
@ -45,6 +46,8 @@ t_fill_default_values(_) ->
<<"session_locking_strategy">> := quorum, <<"session_locking_strategy">> := quorum,
<<"shared_dispatch_ack_enabled">> := false, <<"shared_dispatch_ack_enabled">> := false,
<<"shared_subscription_strategy">> := round_robin, <<"shared_subscription_strategy">> := round_robin,
<<"sys_heartbeat_interval">> := "30s", <<"sys_heartbeat_interval">> := <<"30s">>,
<<"sys_msg_interval">> := "1m"}}, <<"sys_msg_interval">> := <<"1m">>}}, WithDefaults),
emqx_config:fill_defaults(Conf)). %% ensure JSON compatible
_ = emqx_json:encode(WithDefaults),
ok.