]> granicus.if.org Git - ejabberd/commitdiff
Add Riak backend to the testing suit
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>
Wed, 9 Jul 2014 12:38:45 +0000 (16:38 +0400)
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>
Thu, 10 Jul 2014 09:42:31 +0000 (13:42 +0400)
test/ejabberd_SUITE.erl
test/ejabberd_SUITE_data/ejabberd.yml
test/suite.hrl

index 52d3e695a482ea89bc199f219dc6b9c84c98b549..d145d5897785aee75336e949e2b7f9da84871057 100644 (file)
@@ -68,6 +68,8 @@ init_per_group(ldap, Config) ->
     set_opt(server, ?LDAP_VHOST, Config);
 init_per_group(extauth, Config) ->
     set_opt(server, ?EXTAUTH_VHOST, Config);
+init_per_group(riak, Config) ->
+    set_opt(server, ?RIAK_VHOST, Config);
 init_per_group(_GroupName, Config) ->
     Pid = start_event_relay(),
     set_opt(event_relay, Pid, Config).
@@ -84,6 +86,8 @@ end_per_group(ldap, _Config) ->
     ok;
 end_per_group(extauth, _Config) ->
     ok;
+end_per_group(riak, _Config) ->
+    ok;
 end_per_group(_GroupName, Config) ->
     stop_event_relay(Config),
     ok.
@@ -178,6 +182,54 @@ db_tests() ->
       [roster_remove_master,
        roster_remove_slave]}].
 
+db_tests(riak) ->
+    %% No support for mod_pubsub
+    [{single_user, [sequence],
+      [test_register,
+       auth_plain,
+       auth_md5,
+       presence_broadcast,
+       last,
+       roster_get,
+       private,
+       privacy,
+       blocking,
+       vcard,
+       muc_single,
+       test_unregister]},
+     {test_roster_subscribe, [parallel],
+      [roster_subscribe_master,
+       roster_subscribe_slave]},
+     {test_offline, [sequence],
+      [offline_master, offline_slave]},
+     {test_roster_remove, [parallel],
+      [roster_remove_master,
+       roster_remove_slave]}];
+db_tests(_) ->
+    [{single_user, [sequence],
+      [test_register,
+       auth_plain,
+       auth_md5,
+       presence_broadcast,
+       last,
+       roster_get,
+       roster_ver,
+       private,
+       privacy,
+       blocking,
+       vcard,
+       muc_single,
+       pubsub,
+       test_unregister]},
+     {test_roster_subscribe, [parallel],
+      [roster_subscribe_master,
+       roster_subscribe_slave]},
+     {test_offline, [sequence],
+      [offline_master, offline_slave]},
+     {test_roster_remove, [parallel],
+      [roster_remove_master,
+       roster_remove_slave]}].
+
 ldap_tests() ->
     [{ldap_tests, [sequence],
       [test_auth,
@@ -192,9 +244,10 @@ groups() ->
     [{ldap, [sequence], ldap_tests()},
      {extauth, [sequence], extauth_tests()},
      {no_db, [sequence], no_db_tests()},
-     {mnesia, [sequence], db_tests()},
-     {mysql, [sequence], db_tests()},
-     {pgsql, [sequence], db_tests()}].
+     {mnesia, [sequence], db_tests(mnesia)},
+     {mysql, [sequence], db_tests(mysql)},
+     {pgsql, [sequence], db_tests(pgsql)},
+     {riak, [sequence], db_tests(riak)}].
 
 all() ->
     [{group, ldap},
@@ -203,6 +256,7 @@ all() ->
      {group, mysql},
      {group, pgsql},
      {group, extauth},
+     {group, riak},
      stop_ejabberd].
 
 stop_ejabberd(Config) ->
index fd80b199f5dcd0e6ab26aaa138fa8a607c60b3e1..f0cad20232fa8fc789593509cb3b4a63f24a63f9 100644 (file)
@@ -147,6 +147,44 @@ Welcome to this XMPP server."
         welcome_message: 
           subject: "Welcome!"
           body: "Hi.
+Welcome to this XMPP server."
+      mod_stats: []
+      mod_time: []
+      mod_version: []
+  "riak.localhost": 
+    auth_method: riak
+    modules: 
+      mod_announce: 
+        db_type: riak
+      mod_blocking: 
+        db_type: riak
+      mod_caps: 
+        db_type: riak
+      mod_last: 
+        db_type: riak
+      mod_muc: 
+        db_type: riak
+      mod_offline: 
+        db_type: riak
+      mod_privacy: 
+        db_type: riak
+      mod_private: 
+        db_type: riak
+      mod_roster: 
+        versioning: true
+        store_current_id: true
+        db_type: riak
+      mod_vcard: 
+        db_type: riak
+      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: []
@@ -186,6 +224,7 @@ hosts:
   - "pgsql.localhost"
   - "extauth.localhost"
   - "ldap.localhost"
+  - "riak.localhost"
 access: 
   announce: 
     admin: allow
@@ -258,4 +297,4 @@ Welcome to this XMPP server."
 registration_timeout: infinity
 shaper: 
   fast: 50000
-  normal: 1000
\ No newline at end of file
+  normal: 1000
index 2c3610268c2bb54b660cdea99f90bf53b96b9036..ddd751e23f1492fb4888c61429fb60f56070e550 100644 (file)
@@ -59,6 +59,7 @@
 -define(PGSQL_VHOST, <<"pgsql.localhost">>).
 -define(LDAP_VHOST, <<"ldap.localhost">>).
 -define(EXTAUTH_VHOST, <<"extauth.localhost">>).
+-define(RIAK_VHOST, <<"riak.localhost">>).
 
 insert(Val, N, Tuple) ->
     L = tuple_to_list(Tuple),