init_per_group(mnesia, Config) ->
mod_muc:shutdown_rooms(?MNESIA_VHOST),
set_opt(server, ?MNESIA_VHOST, Config);
+init_per_group(redis, Config) ->
+ mod_muc:shutdown_rooms(?REDIS_VHOST),
+ set_opt(server, ?REDIS_VHOST, Config);
init_per_group(mysql, Config) ->
case catch ejabberd_odbc:sql_query(?MYSQL_VHOST, [<<"select 1;">>]) of
{selected, _, _} ->
end_per_group(mnesia, _Config) ->
ok;
+end_per_group(redis, _Config) ->
+ ok;
end_per_group(mysql, _Config) ->
ok;
end_per_group(pgsql, _Config) ->
{test_roster_remove, [parallel],
[roster_remove_master,
roster_remove_slave]}];
-db_tests(mnesia) ->
+db_tests(DB) when DB == mnesia; DB == redis ->
[{single_user, [sequence],
[test_register,
auth_plain,
{extauth, [sequence], extauth_tests()},
{no_db, [sequence], no_db_tests()},
{mnesia, [sequence], db_tests(mnesia)},
+ {redis, [sequence], db_tests(redis)},
{mysql, [sequence], db_tests(mysql)},
{pgsql, [sequence], db_tests(pgsql)},
{sqlite, [sequence], db_tests(sqlite)},
[{group, ldap},
{group, no_db},
{group, mnesia},
+ {group, redis},
{group, mysql},
{group, pgsql},
{group, sqlite},
-define(COMMON_VHOST, <<"localhost">>).
-define(MNESIA_VHOST, <<"mnesia.localhost">>).
+-define(REDIS_VHOST, <<"redis.localhost">>).
-define(MYSQL_VHOST, <<"mysql.localhost">>).
-define(PGSQL_VHOST, <<"pgsql.localhost">>).
-define(SQLITE_VHOST, <<"sqlite.localhost">>).