test: fix inter test suite problem

This commit is contained in:
Kjell Winblad 2024-04-09 11:10:39 +02:00
parent 9628a00a82
commit 958748cf7f
2 changed files with 21 additions and 8 deletions

View File

@ -5,6 +5,14 @@
{emqx_utils, {path, "../emqx_utils"}}
]}.
{profiles, [
{test, [
{deps, [
{emqx_bridge_http, {path, "../emqx_bridge_http"}}
]}
]}
]}.
{erl_opts, [
warn_unused_vars,
warn_shadow_vars,

View File

@ -30,15 +30,20 @@ all() ->
init_per_suite(Config) ->
application:load(emqx_conf),
Apps = emqx_cth_suite:start(
[
AppsToStart = [
emqx,
emqx_conf,
emqx_connector,
emqx_bridge_http,
emqx_bridge,
emqx_bridge_http,
emqx_rule_engine
],
%% I don't know why we need to stop the apps and then start them but if we
%% don't do this and other suites run before this suite the test cases will
%% fail as it seems like the connector silently refuses to start.
ok = emqx_cth_suite:stop(AppsToStart),
Apps = emqx_cth_suite:start(
AppsToStart,
#{work_dir => emqx_cth_suite:work_dir(Config)}
),
emqx_mgmt_api_test_util:init_suite(),