test: use `emqx_cth_suite` in `emqx_coap_api_SUITE`
`emqx_coap_api_SUITE` was failing with `emqx_authn_schema_not_injected` (missing authn schema mods in persistent_term) if it was run standalone.
This commit is contained in:
parent
3530ed66d5
commit
b0d4ba183e
|
@ -57,14 +57,22 @@ all() ->
|
|||
|
||||
init_per_suite(Config) ->
|
||||
application:load(emqx_gateway_coap),
|
||||
ok = emqx_common_test_helpers:load_config(emqx_gateway_schema, ?CONF_DEFAULT),
|
||||
emqx_mgmt_api_test_util:init_suite([emqx_auth, emqx_gateway]),
|
||||
Config.
|
||||
Apps = emqx_cth_suite:start(
|
||||
[
|
||||
{emqx_conf, ?CONF_DEFAULT},
|
||||
emqx_gateway,
|
||||
emqx_auth,
|
||||
emqx_management,
|
||||
{emqx_dashboard, "dashboard.listeners.http { enable = true, bind = 18083 }"}
|
||||
],
|
||||
#{work_dir => emqx_cth_suite:work_dir(Config)}
|
||||
),
|
||||
_ = emqx_common_test_http:create_default_app(),
|
||||
[{suite_apps, Apps} | Config].
|
||||
|
||||
end_per_suite(Config) ->
|
||||
{ok, _} = emqx:remove_config([<<"gateway">>, <<"coap">>]),
|
||||
emqx_mgmt_api_test_util:end_suite([emqx_gateway, emqx_auth]),
|
||||
Config.
|
||||
emqx_cth_suite:stop(?config(suite_apps, Config)),
|
||||
emqx_config:delete_override_conf_files().
|
||||
|
||||
%%--------------------------------------------------------------------
|
||||
%% Cases
|
||||
|
|
Loading…
Reference in New Issue