Closed arcusfelis closed 6 years ago
I'd like to see this change in action with MongooseIM tests. Could you created a PR in MongooseIM repo?
at least it works. There is no error printing triggered in this travis job.
@michalwski It prints something like
----------------------------------------------------
error 2018-06-07 12:01:56.394
issue=pmap_failed reason=error:{badrpc,
{'EXIT',
{haha2,
[{ejabberd_auth,remove_user,2,
[{file,
"/home/user/erlang/esl/2017/MongooseIM/_build/mim1/lib/mongooseim/src/ejabberd_auth.erl"},
{line,553}]},
{ejabberd_admin,unregister,2,
[{file,
"/home/user/erlang/esl/2017/MongooseIM/_build/mim1/lib/mongooseim/src/ejabberd_admin.erl"},
{line,331}]},
{rpc,'-handle_call_call/6-fun-0-',5,
[{file,"rpc.erl"},{line,197}]}]}}}
stacktrace=[{escalus_rpc,call_with_cookie_match,
[mongooseim@localhost,ejabberd_admin,unregister,
[<<"alicE16.272590">>,<<"localhost">>],
3000,ejabberd],
[{file,"/home/user/erlang/esl/2017/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_rpc.erl"},
{line,34}]},
{lists,foreach,2,[{file,"lists.erl"},{line,1338}]},
{escalus_ejabberd,delete_users,2,
[{file,"/home/user/erlang/esl/2017/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_ejabberd.erl"},
{line,217}]},
{escalus_fresh,delete_users,1,
[{file,"/home/user/erlang/esl/2017/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_fresh.erl"},
{line,118}]},
{escalus_fresh,'-worker/3-fun-0-',4,
[{file,"/home/user/erlang/esl/2017/MongooseIM/big_tests/_build/default/lib/escalus/src/escalus_fresh.erl"},
{line,163}]}]
if I modify ejabberd_auth
index 54eed1db9..4acea372e 100644
--- a/src/ejabberd_auth.erl
+++ b/src/ejabberd_auth.erl
@@ -550,6 +550,7 @@ does_user_exist_in_other_modules_loop([AuthModule|AuthModules], User, Server) ->
-spec remove_user(User :: jid:user(),
Server :: jid:server()) -> ok | error | {error, not_allowed}.
remove_user(User, Server) ->
+ error(haha2),
LUser = jid:nodeprep(User),
LServer = jid:nameprep(Server),
do_remove_user(LUser, LServer).
Because this is not enough info