]> granicus.if.org Git - ejabberd/commitdiff
Add Redis backend to the test suite
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>
Fri, 19 Feb 2016 14:06:41 +0000 (17:06 +0300)
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>
Fri, 19 Feb 2016 14:06:41 +0000 (17:06 +0300)
.travis.yml
test/ejabberd_SUITE.erl
test/ejabberd_SUITE_data/ejabberd.yml
test/suite.hrl

index ba2fc3521bed1e3d6dc1dd266aab748a4a3b2eb4..153631809409fba88c48e356e552238037262969 100644 (file)
@@ -7,6 +7,7 @@ otp_release:
 
 services:
   - riak
+  - redis-server
 
 before_install:
   #
index 947bc4bd5376bec413eb8e38fbbc778bc94694bd..1b8d5f4775a8f09f8c2623ecdfbb685bc020e185 100644 (file)
@@ -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},
index 30eaa5edd3a96b39ca9955456318306f6eeccfe2..5507900b871224c6cb9b0fdf1589ff07335967bd 100644 (file)
@@ -220,6 +220,61 @@ Welcome to this XMPP server."
         welcome_message: 
           subject: "Welcome!"
           body: "Hi.
+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: []
@@ -295,6 +350,7 @@ Welcome to this XMPP server."
 hosts: 
   - "localhost"
   - "mnesia.localhost"
+  - "redis.localhost"
   - "mysql.localhost"
   - "pgsql.localhost"
   - "extauth.localhost"
index 5638fdb75d663bdc613c41090db3a2092f166b66..fb6b4f3acd79c260bf4a5dad2b9383e61657371a 100644 (file)
@@ -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">>).