aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-05-01 21:12:50 +0200
committerLoïc Hoguin <[email protected]>2017-05-01 21:12:50 +0200
commit3aab5ef99b98f618f701510d76bcf639b915794f (patch)
treeea3e2f815c698ce363380006fca1445bde887bc5 /test
parent3f0b598edff1f411e31aca18ea96562b0d724257 (diff)
downloadgun-3aab5ef99b98f618f701510d76bcf639b915794f.tar.gz
gun-3aab5ef99b98f618f701510d76bcf639b915794f.tar.bz2
gun-3aab5ef99b98f618f701510d76bcf639b915794f.zip
Add gun:info/11.0.0-pre.3
So far only for getting the socket ip and port on the local side. More values may be added later on.
Diffstat (limited to 'test')
-rw-r--r--test/gun_SUITE.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/gun_SUITE.erl b/test/gun_SUITE.erl
index 505f365..b9706a0 100644
--- a/test/gun_SUITE.erl
+++ b/test/gun_SUITE.erl
@@ -75,6 +75,12 @@ gone_reason(_) ->
error(timeout)
end.
+info(_) ->
+ doc("Get info from the Gun connection."),
+ {ok, Pid} = gun:open("google.com", 443),
+ #{sock_ip := _, sock_port := _} = gun:info(Pid),
+ ok.
+
reply_to(_) ->
doc("The reply_to option allows using a separate process for requests."),
do_reply_to(http),