Skip to content

Commit

Permalink
Merge pull request #1241 from esl/pubsub_SUITE-to-cover-refactor_rebase
Browse files Browse the repository at this point in the history
Improve mod_pubsub test coverage
  • Loading branch information
michalwski authored Mar 30, 2017
2 parents 78876f0 + 433b94e commit 6fc47a8
Show file tree
Hide file tree
Showing 11 changed files with 1,336 additions and 547 deletions.
4 changes: 2 additions & 2 deletions apps/ejabberd/src/mod_caps.erl
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
c2s_presence_in/2, c2s_filter_packet/6,
c2s_broadcast_recipients/6]).

%% cleanup for test cases
-export([delete_caps/1]).
%% for test cases
-export([delete_caps/1, make_disco_hash/2]).

-include("ejabberd.hrl").

Expand Down
163 changes: 104 additions & 59 deletions apps/ejabberd/src/mod_pubsub.erl

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@
{overlay_vars, "rel/vars.config"},
{overlay, [{template, "rel/files/ejabberd.cfg", "etc/ejabberd.cfg"}]} ]}]},
%% development nodes
{mim1, [{relx, [ {overlay_vars, "rel/mim1.vars.config"},
{mim1, [{relx, [ {overlay_vars, ["rel/vars.config", "rel/mim1.vars.config"]},
{overlay, [{template, "rel/files/ejabberd.cfg", "etc/ejabberd.cfg"}]} ]}]},
{mim2, [{relx, [ {overlay_vars, "rel/mim2.vars.config"},
{mim2, [{relx, [ {overlay_vars, ["rel/vars.config", "rel/mim2.vars.config"]},
{overlay, [{template, "rel/files/ejabberd.cfg", "etc/ejabberd.cfg"}]} ]}]},
{mim3, [{relx, [ {overlay_vars, "rel/mim3.vars.config"},
{mim3, [{relx, [ {overlay_vars, ["rel/vars.config", "rel/mim3.vars.config"]},
{overlay, [{template, "rel/files/ejabberd.cfg", "etc/ejabberd.cfg"}]} ]}]},
{fed1, [{relx, [ {overlay_vars, "rel/fed1.vars.config"},
{fed1, [{relx, [ {overlay_vars, ["rel/vars.config", "rel/fed1.vars.config"]},
{overlay, [{template, "rel/files/ejabberd.cfg", "etc/ejabberd.cfg"}]} ]}]} ]}.

{plugins,
Expand Down
1 change: 1 addition & 0 deletions rel/fed1.vars.config
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
{all_metrics_are_global, false}.
{c2s_dhfile, ",{dhfile, \"priv/ssl/fake_dh_server.pem\"}"}.
{s2s_dhfile, ",{dhfile, \"priv/ssl/fake_dh_server.pem\"}"}.

{mongooseim_runner_user, []}.
{mongooseim_script_dir, "$(cd ${0%/*} && pwd)"}.
{mongooseim_etc_dir, "$RUNNER_BASE_DIR/etc"}.
Expand Down
1 change: 1 addition & 0 deletions rel/mim1.vars.config
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
{s2s_certfile, "{s2s_certfile, \"priv/ssl/fake_server.pem\"}."}.
{c2s_dhfile, ",{dhfile, \"priv/ssl/fake_dh_server.pem\"}"}.
{s2s_dhfile, ",{dhfile, \"priv/ssl/fake_dh_server.pem\"}"}.

{mongooseim_runner_user, []}.
{mongooseim_script_dir, "$(cd ${0%/*} && pwd)"}.
{mongooseim_etc_dir, "$RUNNER_BASE_DIR/etc"}.
Expand Down
1 change: 1 addition & 0 deletions rel/mim2.vars.config
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
{all_metrics_are_global, true}.
{c2s_dhfile, ",{dhfile, \"priv/ssl/fake_dh_server.pem\"}"}.
{s2s_dhfile, ",{dhfile, \"priv/ssl/fake_dh_server.pem\"}"}.

{mongooseim_runner_user, []}.
{mongooseim_script_dir, "$(cd ${0%/*} && pwd)"}.
{mongooseim_etc_dir, "$RUNNER_BASE_DIR/etc"}.
Expand Down
1 change: 1 addition & 0 deletions rel/mim3.vars.config
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
{all_metrics_are_global, false}.
{c2s_dhfile, ",{dhfile, \"priv/ssl/fake_dh_server.pem\"}"}.
{s2s_dhfile, ",{dhfile, \"priv/ssl/fake_dh_server.pem\"}"}.

{mongooseim_runner_user, []}.
{mongooseim_script_dir, "$(cd ${0%/*} && pwd)"}.
{mongooseim_etc_dir, "$RUNNER_BASE_DIR/etc"}.
Expand Down
2 changes: 1 addition & 1 deletion test.disabled/ejabberd_tests/rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{jiffy, ".*", {git, "git://github.com/davisp/jiffy.git", "0.14.8"}},
{proper, ".*", {git, "https://github.com/manopapad/proper.git", "v1.2"}},
{exml, ".*", {git, "git://github.com/esl/exml.git", "d365533"}},
{escalus, ".*", {git, "git://github.com/esl/escalus.git", "9c9fb51"}},
{escalus, ".*", {git, "git://github.com/esl/escalus.git", "1091afe"}},
%% Switch cowboy to upstream after ditching support for OTP 17.x
{cowboy, ".*", {git, "git://github.com/rslota/cowboy.git", {tag, "2.0.0-pre.7-r17"}}},
{shotgun, ".*", {git, "https://github.com/inaka/shotgun.git", "4e67065"}},
Expand Down
Loading

0 comments on commit 6fc47a8

Please sign in to comment.