test(ds): Fix emqx standalone test profile selection
This commit is contained in:
parent
8aa27488b6
commit
d7d878fd43
|
@ -32,13 +32,22 @@
|
||||||
all() ->
|
all() ->
|
||||||
emqx_common_test_helpers:all(?MODULE).
|
emqx_common_test_helpers:all(?MODULE).
|
||||||
|
|
||||||
|
%% Needed for standalone mode:
|
||||||
|
-ifndef(EMQX_RELEASE_EDITION).
|
||||||
|
-define(EMQX_RELEASE_EDITION, ce).
|
||||||
|
-endif.
|
||||||
|
|
||||||
|
-if(?EMQX_RELEASE_EDITION == ee).
|
||||||
|
|
||||||
init_per_suite(Config) ->
|
init_per_suite(Config) ->
|
||||||
case emqx_ds_test_helpers:skip_if_norepl() of
|
Config.
|
||||||
false ->
|
|
||||||
Config;
|
-else.
|
||||||
Yes ->
|
|
||||||
Yes
|
init_per_suite(Config) ->
|
||||||
end.
|
{skip, no_replication}.
|
||||||
|
|
||||||
|
-endif.
|
||||||
|
|
||||||
end_per_suite(_Config) ->
|
end_per_suite(_Config) ->
|
||||||
ok.
|
ok.
|
||||||
|
|
|
@ -20,7 +20,7 @@ EEDeps =
|
||||||
],
|
],
|
||||||
case Profile of
|
case Profile of
|
||||||
ee ->
|
ee ->
|
||||||
{deps, CEDeps ++ EEDeps};
|
[{deps, CEDeps ++ EEDeps}];
|
||||||
ce ->
|
ce ->
|
||||||
{deps, CEDeps}
|
[{deps, CEDeps}]
|
||||||
end.
|
end.
|
||||||
|
|
|
@ -27,16 +27,21 @@ all() ->
|
||||||
emqx_common_test_helpers:all(?MODULE).
|
emqx_common_test_helpers:all(?MODULE).
|
||||||
|
|
||||||
init_per_suite(Config) ->
|
init_per_suite(Config) ->
|
||||||
Apps = emqx_cth_suite:start(
|
case emqx_ds_test_helpers:skip_if_norepl() of
|
||||||
[
|
false ->
|
||||||
{emqx, "durable_sessions.enable = true"},
|
Apps = emqx_cth_suite:start(
|
||||||
emqx_management,
|
[
|
||||||
{emqx_dashboard, "dashboard.listeners.http { enable = true, bind = 18083 }"}
|
{emqx, "durable_sessions.enable = true"},
|
||||||
],
|
emqx_management,
|
||||||
#{work_dir => emqx_cth_suite:work_dir(Config)}
|
{emqx_dashboard, "dashboard.listeners.http { enable = true, bind = 18083 }"}
|
||||||
),
|
],
|
||||||
{ok, _} = emqx_common_test_http:create_default_app(),
|
#{work_dir => emqx_cth_suite:work_dir(Config)}
|
||||||
[{suite_apps, Apps} | Config].
|
),
|
||||||
|
{ok, _} = emqx_common_test_http:create_default_app(),
|
||||||
|
[{suite_apps, Apps} | Config];
|
||||||
|
Yes ->
|
||||||
|
Yes
|
||||||
|
end.
|
||||||
|
|
||||||
end_per_suite(Config) ->
|
end_per_suite(Config) ->
|
||||||
ok = emqx_cth_suite:stop(?config(suite_apps, Config)).
|
ok = emqx_cth_suite:stop(?config(suite_apps, Config)).
|
||||||
|
|
Loading…
Reference in New Issue