From 71a856deaafa5dcb706c70b414f9a2219cdec855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chmielowski?= Date: Fri, 16 Feb 2018 16:49:39 +0100 Subject: Handle gracefully that mnesia is already loaded when starting tests --- test/suite.erl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/suite.erl b/test/suite.erl index b91583d18..960cbdc90 100644 --- a/test/suite.erl +++ b/test/suite.erl @@ -89,8 +89,14 @@ init_config(Config) -> ConfigPath = filename:join([CWD, "ejabberd.yml"]), ok = file:write_file(ConfigPath, CfgContent2), setup_ejabberd_lib_path(Config), - ok = application:load(sasl), - ok = application:load(mnesia), + case application:load(sasl) of + ok -> ok; + {error, {already_loaded, _}} -> ok + end, + case application:load(mnesia) of + ok -> ok; + {error, {already_loaded, _}} -> ok + end, case application:load(ejabberd) of ok -> ok; {error, {already_loaded, _}} -> ok -- cgit v1.2.3 From f5d208441d97322c3c5e25047b425d2f83565655 Mon Sep 17 00:00:00 2001 From: Evgeniy Khramtsov Date: Fri, 16 Feb 2018 20:34:09 +0300 Subject: Improve example extauth script --- test/ejabberd_SUITE_data/extauth.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') diff --git a/test/ejabberd_SUITE_data/extauth.py b/test/ejabberd_SUITE_data/extauth.py index 263d6464e..b6a217fcc 100755 --- a/test/ejabberd_SUITE_data/extauth.py +++ b/test/ejabberd_SUITE_data/extauth.py @@ -13,6 +13,10 @@ def read(): write(True) elif cmd == 'isuser': u, s = pkt.split(':', 2)[1:] + if u == "wrong": + write(False) + else: + write(True) elif cmd == 'setpass': u, s, p = pkt.split(':', 3)[1:] write(True) -- cgit v1.2.3