Skip to content

Commit

Permalink
[tests] apply changes done in esl/ejabberd_tests#122
Browse files Browse the repository at this point in the history
  • Loading branch information
michalwski committed Oct 8, 2015
1 parent 8d71cb2 commit 6430385
Show file tree
Hide file tree
Showing 6 changed files with 434 additions and 379 deletions.
7 changes: 3 additions & 4 deletions test/ejabberd_tests/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -206,17 +206,16 @@
"{ldap_filter, \"(objectClass=inetOrgPerson)\"}.\n"
},
{mod_vcard,"{mod_vcard, [{backend, ldap},{ldap_filter,\"(objectClass=inetOrgPerson)\"},"
"{ldap_base, \"ou=Users,dc=ejd,dc=com\"},"
"{ldap_search_fields,[{\"Full Name\",\"cn\"},{\"User\",\"uid\"}]},"
"{ldap_vcard_map,[ {\"FN\",[{ \"%s\",[\"cn\"]}] } ]}"
"{ldap_base, \"ou=Users,dc=ejd,dc=com\"}"
"]},"}

]},
{riak_mnesia,
[{sm_backend, "{mnesia, []}"},
{auth_method, "riak"},
{riak_server, "{riak_server, [{pool_size, 5}, {address, \"127.0.0.1\"},{port, 8087}]}."},
{mod_private, "{mod_private, [{backend, riak}]},"}
{mod_private, "{mod_private, [{backend, riak}]},"},
{mod_vcard, "{mod_vcard, [{backend, riak}]},"}
]}
]}.

Expand Down
4 changes: 2 additions & 2 deletions test/ejabberd_tests/tests/dynamic_modules.erl
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ unsafe_stop(Domain, Mod) ->
case escalus_ejabberd:rpc(gen_mod, stop_module, [Domain, Mod]) of
{badrpc, Reason} ->
ct:fail("Cannot stop module ~p reason ~p", [Mod, Reason]);
_ -> ok
R -> R
end.

start(Domain, Mod, Args) ->
io:format("starting ~p", [Mod]),
case escalus_ejabberd:rpc(gen_mod, start_module, [Domain, Mod, Args]) of
{badrpc, Reason} ->
ct:fail("Cannot start module ~p reason ~p", [Mod, Reason]);
_ -> ok
R -> R
end.

restart(Domain, Mod, Args) ->
Expand Down
1 change: 1 addition & 0 deletions test/ejabberd_tests/tests/mongoose_helper.erl
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ generic_count_backend(mod_private_mysql) -> count_odbc(<<"private_storage">>);
generic_count_backend(mod_private_riak) -> count_riak(<<"private">>);
generic_count_backend(mod_vcard_mnesia) -> count_wildpattern(vcard);
generic_count_backend(mod_vcard_odbc) -> count_odbc(<<"vcard">>);
generic_count_backend(mod_vcard_riak) -> count_riak(<<"vcard">>);
generic_count_backend(mod_vcard_ldap) ->
D = escalus_ct:get_config(ejabberd_domain),
%% number of vcards in ldap is the same as number of users
Expand Down
Loading

0 comments on commit 6430385

Please sign in to comment.