diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2016-02-19 17:06:41 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2016-02-19 17:06:41 +0300 |
commit | 8f9c18edf229c010229fa3cd65c7d77bb6bd566b (patch) | |
tree | 15dd3ed958b109bcaa5dd019796c55f55e5b2969 /test | |
parent | Make it possible to define 'sm_db_type' per virtual host (diff) |
Add Redis backend to the test suite
Diffstat (limited to 'test')
-rw-r--r-- | test/ejabberd_SUITE.erl | 9 | ||||
-rw-r--r-- | test/ejabberd_SUITE_data/ejabberd.yml | 56 | ||||
-rw-r--r-- | test/suite.hrl | 1 |
3 files changed, 65 insertions, 1 deletions
diff --git a/test/ejabberd_SUITE.erl b/test/ejabberd_SUITE.erl index 947bc4bd..1b8d5f47 100644 --- a/test/ejabberd_SUITE.erl +++ b/test/ejabberd_SUITE.erl @@ -47,6 +47,9 @@ init_per_group(no_db, Config) -> 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, _, _} -> @@ -92,6 +95,8 @@ init_per_group(_GroupName, Config) -> end_per_group(mnesia, _Config) -> ok; +end_per_group(redis, _Config) -> + ok; end_per_group(mysql, _Config) -> ok; end_per_group(pgsql, _Config) -> @@ -227,7 +232,7 @@ db_tests(riak) -> {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, @@ -322,6 +327,7 @@ groups() -> {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)}, @@ -331,6 +337,7 @@ all() -> [{group, ldap}, {group, no_db}, {group, mnesia}, + {group, redis}, {group, mysql}, {group, pgsql}, {group, sqlite}, diff --git a/test/ejabberd_SUITE_data/ejabberd.yml b/test/ejabberd_SUITE_data/ejabberd.yml index 30eaa5ed..5507900b 100644 --- a/test/ejabberd_SUITE_data/ejabberd.yml +++ b/test/ejabberd_SUITE_data/ejabberd.yml @@ -224,6 +224,61 @@ Welcome to this XMPP server." mod_stats: [] mod_time: [] mod_version: [] + "redis.localhost": + auth_method: internal + sm_db_type: redis + modules: + mod_announce: + db_type: internal + access: local + mod_blocking: [] + mod_caps: + db_type: internal + mod_last: + db_type: internal + mod_muc: + db_type: internal + mod_offline: + db_type: internal + mod_privacy: + db_type: internal + mod_private: + db_type: internal + mod_pubsub: + access_createnode: pubsub_createnode + ignore_pep_from_offline: true + last_item_cache: false + plugins: + - "flat" + - "hometree" + - "pep" + mod_roster: + versioning: true + store_current_id: true + db_type: internal + mod_mam: + db_type: internal + mod_vcard: + db_type: internal + mod_vcard_xupdate: + db_type: internal + mod_carboncopy: [] + mod_client_state: + drop_chat_states: true + queue_presence: true + mod_adhoc: [] + mod_configure: [] + mod_disco: [] + mod_ping: [] + mod_proxy65: [] + mod_register: + welcome_message: + subject: "Welcome!" + body: "Hi. +Welcome to this XMPP server." + mod_stats: [] + mod_time: [] + mod_version: [] "riak.localhost": auth_method: riak modules: @@ -295,6 +350,7 @@ Welcome to this XMPP server." hosts: - "localhost" - "mnesia.localhost" + - "redis.localhost" - "mysql.localhost" - "pgsql.localhost" - "extauth.localhost" diff --git a/test/suite.hrl b/test/suite.hrl index 5638fdb7..fb6b4f3a 100644 --- a/test/suite.hrl +++ b/test/suite.hrl @@ -74,6 +74,7 @@ -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">>). |