aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2013-06-15 01:23:57 +1000
committerAlexey Shchepin <alexey@process-one.net>2013-06-17 16:04:18 +0300
commitc9efdf616780674daf9ae5867ac1299db5726c1c (patch)
tree7c226993e4685403165c8e2d5d9abadb649f4698 /test
parentRemove forgotten comments (diff)
Better certfile location detection by the test suite
Diffstat (limited to 'test')
-rw-r--r--test/ejabberd_SUITE.erl2
-rw-r--r--test/ejabberd_SUITE_data/ejabberd.cfg2
2 files changed, 3 insertions, 1 deletions
diff --git a/test/ejabberd_SUITE.erl b/test/ejabberd_SUITE.erl
index dc4692457..bf0698a72 100644
--- a/test/ejabberd_SUITE.erl
+++ b/test/ejabberd_SUITE.erl
@@ -37,6 +37,8 @@ init_per_suite(Config) ->
SASLPath = filename:join([PrivDir, "sasl.log"]),
MnesiaDir = filename:join([PrivDir, "mnesia"]),
CertFile = filename:join([DataDir, "cert.pem"]),
+ {ok, CWD} = file:get_cwd(),
+ {ok, _} = file:copy(CertFile, filename:join([CWD, "cert.pem"])),
application:set_env(ejabberd, config, ConfigPath),
application:set_env(ejabberd, log_path, LogPath),
application:set_env(sasl, sasl_error_logger, {file, SASLPath}),
diff --git a/test/ejabberd_SUITE_data/ejabberd.cfg b/test/ejabberd_SUITE_data/ejabberd.cfg
index 48f6580ec..7662c1743 100644
--- a/test/ejabberd_SUITE_data/ejabberd.cfg
+++ b/test/ejabberd_SUITE_data/ejabberd.cfg
@@ -1,6 +1,6 @@
{loglevel, 4}.
{hosts, ["localhost"]}.
-{define_macro, 'CERTFILE', "../../test/ejabberd_SUITE_data/cert.pem"}.
+{define_macro, 'CERTFILE', "cert.pem"}.
{listen,
[
{5222, ejabberd_c2s, [