diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/twitter_SUITE.erl | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/test/twitter_SUITE.erl b/test/twitter_SUITE.erl index 86f9a85..6cd53c4 100644 --- a/test/twitter_SUITE.erl +++ b/test/twitter_SUITE.erl @@ -16,11 +16,24 @@ -compile(export_all). all() -> - [spdy]. + [http, http2, spdy]. + +http(_) -> + {ok, Pid} = gun:open("twitter.com", 443, #{protocols => [http]}), + {ok, http} = gun:await_up(Pid), + common(Pid). + +http2(_) -> + {ok, Pid} = gun:open("twitter.com", 443, #{protocols => [http2]}), + {ok, http2} = gun:await_up(Pid), + common(Pid). spdy(_) -> - {ok, Pid} = gun:open("twitter.com", 443), + {ok, Pid} = gun:open("twitter.com", 443, #{protocols => [spdy]}), {ok, spdy} = gun:await_up(Pid), + common(Pid). + +common(Pid) -> Ref = gun:get(Pid, "/"), receive {gun_response, Pid, Ref, nofin, Status, Headers} -> |