|
@@ -34,24 +34,23 @@ all() ->
|
|
|
|
|
|
|
|
init_per_suite(Config) ->
|
|
init_per_suite(Config) ->
|
|
|
WorkDir = proplists:get_value(data_dir, Config),
|
|
WorkDir = proplists:get_value(data_dir, Config),
|
|
|
- ok = filelib:ensure_dir(WorkDir),
|
|
|
|
|
DemoShDir1 = string:replace(WorkDir, "emqx_mgmt_api_plugins", "emqx_plugins"),
|
|
DemoShDir1 = string:replace(WorkDir, "emqx_mgmt_api_plugins", "emqx_plugins"),
|
|
|
DemoShDir = lists:flatten(string:replace(DemoShDir1, "emqx_management", "emqx_plugins")),
|
|
DemoShDir = lists:flatten(string:replace(DemoShDir1, "emqx_management", "emqx_plugins")),
|
|
|
- OrigInstallDir = emqx_plugins:get_config_interal(install_dir, undefined),
|
|
|
|
|
|
|
+ Apps = emqx_cth_suite:start(
|
|
|
|
|
+ [
|
|
|
|
|
+ emqx_conf,
|
|
|
|
|
+ emqx_plugins,
|
|
|
|
|
+ emqx_management,
|
|
|
|
|
+ emqx_mgmt_api_test_util:emqx_dashboard()
|
|
|
|
|
+ ],
|
|
|
|
|
+ #{work_dir => emqx_cth_suite:work_dir(Config)}
|
|
|
|
|
+ ),
|
|
|
ok = filelib:ensure_dir(DemoShDir),
|
|
ok = filelib:ensure_dir(DemoShDir),
|
|
|
- emqx_mgmt_api_test_util:init_suite([emqx_conf, emqx_plugins]),
|
|
|
|
|
emqx_plugins:put_config_internal(install_dir, DemoShDir),
|
|
emqx_plugins:put_config_internal(install_dir, DemoShDir),
|
|
|
- [{demo_sh_dir, DemoShDir}, {orig_install_dir, OrigInstallDir} | Config].
|
|
|
|
|
|
|
+ [{apps, Apps}, {demo_sh_dir, DemoShDir} | Config].
|
|
|
|
|
|
|
|
end_per_suite(Config) ->
|
|
end_per_suite(Config) ->
|
|
|
- emqx_common_test_helpers:boot_modules(all),
|
|
|
|
|
- %% restore config
|
|
|
|
|
- case proplists:get_value(orig_install_dir, Config) of
|
|
|
|
|
- undefined -> ok;
|
|
|
|
|
- OrigInstallDir -> emqx_plugins:put_config_internal(install_dir, OrigInstallDir)
|
|
|
|
|
- end,
|
|
|
|
|
- emqx_mgmt_api_test_util:end_suite([emqx_plugins, emqx_conf]),
|
|
|
|
|
- ok.
|
|
|
|
|
|
|
+ ok = emqx_cth_suite:stop(?config(apps, Config)).
|
|
|
|
|
|
|
|
init_per_testcase(t_cluster_update_order = TestCase, Config0) ->
|
|
init_per_testcase(t_cluster_update_order = TestCase, Config0) ->
|
|
|
Config = [{api_port, 18085} | Config0],
|
|
Config = [{api_port, 18085} | Config0],
|