aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/test/ssl_test_lib.erl
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2016-09-07 15:54:32 +0200
committerIngela Anderton Andin <[email protected]>2016-09-07 16:05:23 +0200
commit76c93beeb89ecbcf1070190c95532e0d00d06278 (patch)
tree6611827fcea4b31cd4a5ab049356b8b2006caa20 /lib/ssl/test/ssl_test_lib.erl
parent61b1abd20322ad4f05eab7d53c333c6a1e91c296 (diff)
downloadotp-76c93beeb89ecbcf1070190c95532e0d00d06278.tar.gz
otp-76c93beeb89ecbcf1070190c95532e0d00d06278.tar.bz2
otp-76c93beeb89ecbcf1070190c95532e0d00d06278.zip
ssl: Make sure tests get a clean start
Diffstat (limited to 'lib/ssl/test/ssl_test_lib.erl')
-rw-r--r--lib/ssl/test/ssl_test_lib.erl16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl
index a92b978ca9..81f16030f7 100644
--- a/lib/ssl/test/ssl_test_lib.erl
+++ b/lib/ssl/test/ssl_test_lib.erl
@@ -1355,3 +1355,19 @@ ct_log_supported_protocol_versions(Config) ->
_ ->
ct:log("TLS/SSL version ~p~n ", [tls_record:supported_protocol_versions()])
end.
+
+clean_env() ->
+ application:unset_env(ssl, protocol_version),
+ application:unset_env(ssl, session_lifetime),
+ application:unset_env(ssl, session_cb),
+ application:unset_env(ssl, session_cb_init_args),
+ application:unset_env(ssl, session_cache_client_max),
+ application:unset_env(ssl, session_cache_server_max),
+ application:unset_env(ssl, ssl_pem_cache_clean),
+ application:unset_env(ssl, alert_timeout).
+
+clean_start() ->
+ ssl:stop(),
+ application:load(ssl),
+ clean_env(),
+ ssl:start().