aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/test
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2011-12-07 16:52:11 +0100
committerAnders Svensson <[email protected]>2011-12-07 16:52:11 +0100
commitac3cbe8bee6b826004c02a1d21f8093899716b33 (patch)
tree0550844be1423b06c75c704af6bab056ffe69750 /lib/diameter/test
parent6004f23e77856b8182fae699789b994e55691138 (diff)
parent75fa191f9fc48a769e5f99f8dc6b9463d21c9e0c (diff)
downloadotp-ac3cbe8bee6b826004c02a1d21f8093899716b33.tar.gz
otp-ac3cbe8bee6b826004c02a1d21f8093899716b33.tar.bz2
otp-ac3cbe8bee6b826004c02a1d21f8093899716b33.zip
Merge branch 'anders/diameter/suites_and_dialyzer/OTP-9781'
* anders/diameter/suites_and_dialyzer/OTP-9781: Minor diameter_dict_scanner fix Skip sctp tests on {error, esocktnosupport} Ensure that TLS will be available in TLS suite
Diffstat (limited to 'lib/diameter/test')
-rw-r--r--lib/diameter/test/diameter_tls_SUITE.erl18
-rw-r--r--lib/diameter/test/diameter_transport_SUITE.erl3
2 files changed, 14 insertions, 7 deletions
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.
diff --git a/lib/diameter/test/diameter_transport_SUITE.erl b/lib/diameter/test/diameter_transport_SUITE.erl
index 3bd96ee422..df7161fd1e 100644
--- a/lib/diameter/test/diameter_transport_SUITE.erl
+++ b/lib/diameter/test/diameter_transport_SUITE.erl
@@ -179,7 +179,8 @@ have_sctp() ->
{ok, Sock} ->
gen_sctp:close(Sock),
true;
- {error, eprotonosupport} -> %% fail on any other reason
+ {error, E} when E == eprotonosupport;
+ E == esocktnosupport -> %% fail on any other reason
false
catch
error: badarg ->