aboutsummaryrefslogtreecommitdiffstats
path: root/test/cowboy_test.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-03-10 23:30:49 +0100
committerLoïc Hoguin <[email protected]>2016-03-10 23:30:49 +0100
commit92edad53d2546f64fc6dc58b697487e2f7be8ba9 (patch)
tree662d74aa991039d7dffca74953e17e2a7ae53e35 /test/cowboy_test.erl
parente87438ffb1c63615f46dd7a7344b05918116ed1a (diff)
downloadcowboy-92edad53d2546f64fc6dc58b697487e2f7be8ba9.tar.gz
cowboy-92edad53d2546f64fc6dc58b697487e2f7be8ba9.tar.bz2
cowboy-92edad53d2546f64fc6dc58b697487e2f7be8ba9.zip
Add the beginning of the rfc7540 test suite
Currently only testing handshake. Tests that pass currently involve no request/response. ALPN and prior knowledge support have some edge cases left to fix. HTTP/1.1 Upgrade has not been implemented yet.
Diffstat (limited to 'test/cowboy_test.erl')
-rw-r--r--test/cowboy_test.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/cowboy_test.erl b/test/cowboy_test.erl
index 07faf8e..44ffdf8 100644
--- a/test/cowboy_test.erl
+++ b/test/cowboy_test.erl
@@ -30,6 +30,12 @@ init_https(Ref, ProtoOpts, Config) ->
Port = ranch:get_port(Ref),
[{type, ssl}, {protocol, http}, {port, Port}, {opts, Opts}|Config].
+init_http2(Ref, ProtoOpts, Config) ->
+ Opts = ct_helper:get_certs_from_ets(),
+ {ok, _} = cowboy:start_tls(Ref, 100, Opts ++ [{port, 0}], ProtoOpts),
+ Port = ranch:get_port(Ref),
+ [{type, ssl}, {protocol, http2}, {port, Port}, {opts, Opts}|Config].
+
%% Common group of listeners used by most suites.
common_all() ->