From 5bef23a095dff0e5e0a8662011f0cf312bf67ffc Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Mon, 5 Dec 2011 18:48:35 +0100 Subject: Ensure that TLS will be available in TLS suite The existence of openssl is not enough. --- lib/diameter/test/diameter_tls_SUITE.erl | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'lib/diameter') diff --git a/lib/diameter/test/diameter_tls_SUITE.erl b/lib/diameter/test/diameter_tls_SUITE.erl index 7854411d2e..a325ca33eb 100644 --- a/lib/diameter/test/diameter_tls_SUITE.erl +++ b/lib/diameter/test/diameter_tls_SUITE.erl @@ -151,16 +151,22 @@ init_per_group(_, Config) -> end_per_group(_, _) -> ok. +%% Shouldn't really have to know about crypto here but 'ok' from +%% ssl:start() isn't enough to guarantee that TLS is available. init_per_suite(Config) -> - case os:find_executable("openssl") of - false -> - {skip, no_openssl}; - _ -> - Config + try + false /= os:find_executable("openssl") + orelse throw({?MODULE, no_openssl}), + ok == crypto:start() + orelse throw({?MODULE, no_crypto}), + Config + catch + {?MODULE, E} -> + {skip, E} end. end_per_suite(_Config) -> - ok. + crypto:stop(). %% Testcases to run when services are started and connections %% established. -- cgit v1.2.3