aboutsummaryrefslogtreecommitdiffstats
path: root/test/gun_SUITE.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2019-04-26 14:57:34 +0200
committerLoïc Hoguin <[email protected]>2019-04-26 14:57:34 +0200
commiteb74e3d30ca9fa47268d3a235f928341fb807423 (patch)
tree6972ea3495306166467b239c840b5eedb322809c /test/gun_SUITE.erl
parenta943324efff332c76a9738561b42c086fd910552 (diff)
downloadgun-eb74e3d30ca9fa47268d3a235f928341fb807423.tar.gz
gun-eb74e3d30ca9fa47268d3a235f928341fb807423.tar.bz2
gun-eb74e3d30ca9fa47268d3a235f928341fb807423.zip
Add the supervise option to start without supervisor
Diffstat (limited to 'test/gun_SUITE.erl')
-rw-r--r--test/gun_SUITE.erl8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/gun_SUITE.erl b/test/gun_SUITE.erl
index 166089b..2c7b4b8 100644
--- a/test/gun_SUITE.erl
+++ b/test/gun_SUITE.erl
@@ -488,6 +488,14 @@ stream_info_http2(_) ->
{error, not_connected} = gun:stream_info(Pid, StreamRef),
gun:close(Pid).
+supervise_false(_) ->
+ doc("The supervise option allows starting without a supervisor."),
+ {ok, _, OriginPort} = init_origin(tcp, http),
+ {ok, Pid} = gun:open("localhost", OriginPort, #{supervise => false}),
+ {ok, http} = gun:await_up(Pid),
+ [] = [P || {_, P, _, _} <- supervisor:which_children(gun_sup), P =:= Pid],
+ ok.
+
transform_header_name(_) ->
doc("The transform_header_name option allows changing the case of header names."),
{ok, ListenSocket} = gen_tcp:listen(0, [binary, {active, false}]),