test(ds): Fix emqx standalone test profile selection

This commit is contained in:
ieQu1 2024-06-18 17:48:19 +02:00
parent 8aa27488b6
commit d7d878fd43
No known key found for this signature in database
GPG Key ID: 488654DF3FED6FDE
3 changed files with 32 additions and 18 deletions

View File

@ -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.

View File

@ -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.

View File

@ -27,6 +27,8 @@ all() ->
emqx_common_test_helpers:all(?MODULE). emqx_common_test_helpers:all(?MODULE).
init_per_suite(Config) -> init_per_suite(Config) ->
case emqx_ds_test_helpers:skip_if_norepl() of
false ->
Apps = emqx_cth_suite:start( Apps = emqx_cth_suite:start(
[ [
{emqx, "durable_sessions.enable = true"}, {emqx, "durable_sessions.enable = true"},
@ -36,7 +38,10 @@ init_per_suite(Config) ->
#{work_dir => emqx_cth_suite:work_dir(Config)} #{work_dir => emqx_cth_suite:work_dir(Config)}
), ),
{ok, _} = emqx_common_test_http:create_default_app(), {ok, _} = emqx_common_test_http:create_default_app(),
[{suite_apps, Apps} | Config]. [{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)).