test: add facility for starting `emqx_dashboard` with `emqx_cth_suite`
This commit is contained in:
parent
755b59b7fe
commit
0515c5528f
|
@ -50,6 +50,21 @@ set_special_configs(emqx_dashboard) ->
|
||||||
set_special_configs(_App) ->
|
set_special_configs(_App) ->
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
|
-spec emqx_dashboard() -> emqx_cth_suite:appspec().
|
||||||
|
emqx_dashboard() ->
|
||||||
|
emqx_dashboard("dashboard.listeners.http { enable = true, bind = 18083 }").
|
||||||
|
|
||||||
|
emqx_dashboard(Config) ->
|
||||||
|
{emqx_dashboard, #{
|
||||||
|
config => Config,
|
||||||
|
before_start => fun() ->
|
||||||
|
{ok, _} = emqx_common_test_http:create_default_app()
|
||||||
|
end,
|
||||||
|
after_start => fun() ->
|
||||||
|
true = emqx_dashboard_listener:is_ready(infinity)
|
||||||
|
end
|
||||||
|
}}.
|
||||||
|
|
||||||
%% there is no difference between the 'request' and 'request_api'
|
%% there is no difference between the 'request' and 'request_api'
|
||||||
%% the 'request' is only to be compatible with the 'emqx_dashboard_api_test_helpers:request'
|
%% the 'request' is only to be compatible with the 'emqx_dashboard_api_test_helpers:request'
|
||||||
request(Method, Url) ->
|
request(Method, Url) ->
|
||||||
|
|
Loading…
Reference in New Issue