aboutsummaryrefslogtreecommitdiffstats
path: root/test/gun_test.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/gun_test.erl')
-rw-r--r--test/gun_test.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/gun_test.erl b/test/gun_test.erl
index a263335..bb162f4 100644
--- a/test/gun_test.erl
+++ b/test/gun_test.erl
@@ -22,6 +22,10 @@
%% Cowboy listeners.
+init_cowboy_tcp(Ref, ProtoOpts, Config) ->
+ {ok, _} = cowboy:start_clear(Ref, [{port, 0}], ProtoOpts),
+ [{ref, Ref}, {port, ranch:get_port(Ref)}|Config].
+
init_cowboy_tls(Ref, ProtoOpts, Config) ->
Opts = ct_helper:get_certs_from_ets(),
{ok, _} = cowboy:start_tls(Ref, Opts ++ [{port, 0}], ProtoOpts),