test: fix a flaky test which gets interfered by other test cases

This commit is contained in:
Zaiming (Stone) Shi 2021-12-03 21:20:50 +01:00
parent 5525cb3262
commit a723e41390
1 changed files with 3 additions and 0 deletions

View File

@ -28,6 +28,8 @@
-include_lib("eunit/include/eunit.hrl").
%% this parses to #{}, will not cause config cleanup
%% so we will need call emqx_config:erase
-define(CONF_DEFAULT, <<"
gateway {}
">>).
@ -39,6 +41,7 @@ gateway {}
all() -> emqx_common_test_helpers:all(?MODULE).
init_per_suite(Conf) ->
emqx_config:erase(gateway),
emqx_config:init_load(emqx_gateway_schema, ?CONF_DEFAULT),
emqx_mgmt_api_test_util:init_suite([emqx_conf, emqx_authn, emqx_gateway]),
Conf.