Tests: Run agnostic-database tests only once, not for every backend

This commit is contained in:
Badlop
2025-09-30 00:13:17 +02:00
parent bba9563525
commit 10a82afd46
3 changed files with 10 additions and 4 deletions
+8 -2
View File
@@ -71,7 +71,13 @@ end_per_suite(_Config) ->
application:stop(ejabberd).
init_per_group(Group, Config) ->
case lists:member(Group, ?BACKENDS) of
BackendOfGroup = case Group of
component -> agnostic;
no_db -> agnostic;
s2s -> agnostic;
_ -> Group
end,
case lists:member(BackendOfGroup, ?BACKENDS) of
false ->
%% Not a backend related group, do default init:
do_init_per_group(Group, Config);
@@ -82,7 +88,7 @@ init_per_group(Group, Config) ->
do_init_per_group(Group, Config);
Backends ->
%% Skipped backends that were not explicitly enabled
case lists:member(Group, Backends) of
case lists:member(BackendOfGroup, Backends) of
true ->
do_init_per_group(Group, Config);
false ->
+1 -1
View File
@@ -229,7 +229,7 @@ get_config_backends() ->
end,
application:load(ejabberd),
EnabledBackends = application:get_env(ejabberd, enabled_backends, EnvBackends),
misc:intersection(EnvBackends, [mnesia, ldap, extauth|EnabledBackends]).
misc:intersection(EnvBackends, [agnostic, mnesia, ldap, extauth|EnabledBackends]).
process_config_tpl(Content, []) ->
Content;
+1 -1
View File
@@ -103,7 +103,7 @@
-define(S2S_VHOST, <<"s2s.localhost">>).
-define(UPLOAD_VHOST, <<"upload.localhost">>).
-define(BACKENDS, [mnesia, redis, mysql, mssql, pgsql, sqlite, ldap, extauth]).
-define(BACKENDS, [agnostic, mnesia, redis, mysql, mssql, pgsql, sqlite, ldap, extauth]).
insert(Val, N, Tuple) ->
L = tuple_to_list(Tuple),