From b0d4ba183ef32dcb502358c81569e6f366a5677d Mon Sep 17 00:00:00 2001 From: Serge Tupchii Date: Tue, 28 Nov 2023 19:30:02 +0200 Subject: [PATCH] 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. --- .../test/emqx_coap_api_SUITE.erl | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/apps/emqx_gateway_coap/test/emqx_coap_api_SUITE.erl b/apps/emqx_gateway_coap/test/emqx_coap_api_SUITE.erl index 71209e97d..e93c7d761 100644 --- a/apps/emqx_gateway_coap/test/emqx_coap_api_SUITE.erl +++ b/apps/emqx_gateway_coap/test/emqx_coap_api_SUITE.erl @@ -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