aboutsummaryrefslogtreecommitdiffstats
path: root/test/rfc7231_SUITE.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2019-04-22 21:56:53 +0200
committerLoïc Hoguin <[email protected]>2019-04-22 21:56:53 +0200
commitbeac669a066f3d8936c392976531a0070ce93c63 (patch)
treeeb3dfc43d7f9e5fa0c97a34f5e541245e7e51473 /test/rfc7231_SUITE.erl
parent9cf35986eb3c63d55c85bceb13718b3aca20867c (diff)
downloadgun-beac669a066f3d8936c392976531a0070ce93c63.tar.gz
gun-beac669a066f3d8936c392976531a0070ce93c63.tar.bz2
gun-beac669a066f3d8936c392976531a0070ce93c63.zip
Use ssl:ssl_accept/2 in tests to support OTP 20+
ssl:handshake/2 was introduced in OTP 21.
Diffstat (limited to 'test/rfc7231_SUITE.erl')
-rw-r--r--test/rfc7231_SUITE.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/rfc7231_SUITE.erl b/test/rfc7231_SUITE.erl
index f67b7ed..6ef07fe 100644
--- a/test/rfc7231_SUITE.erl
+++ b/test/rfc7231_SUITE.erl
@@ -16,6 +16,10 @@
-compile(export_all).
-compile(nowarn_export_all).
+-ifdef(OTP_RELEASE).
+-compile({nowarn_deprecated_function, [{ssl, ssl_accept, 2}]}).
+-endif.
+
-import(ct_helper, [doc/1]).
-import(gun_test, [init_origin/1]).
-import(gun_test, [init_origin/2]).
@@ -61,7 +65,8 @@ do_proxy_init(Parent, Transport, Status, ConnectRespHeaders, Delay) ->
gen_tcp:accept(ListenSocket, 1000);
gun_tls ->
{ok, ClientSocket0} = ssl:transport_accept(ListenSocket, 1000),
- ssl:handshake(ClientSocket0, 1000)
+ ssl:ssl_accept(ClientSocket0, 1000),
+ {ok, ClientSocket0}
end,
{ok, Data} = case Transport of
gun_tcp ->