aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-11-19 22:17:57 +0100
committerLoïc Hoguin <[email protected]>2017-11-19 22:17:57 +0100
commitd7761b52592e4ca8192cf16498c7aaa3c71526ce (patch)
tree12f9547d4fa0ce2dc0e0b210e34ff9b0ffce51d6 /test
parentf6539a9a68a6eb2c3a23906282e1b7582249f9be (diff)
downloadcowboy-d7761b52592e4ca8192cf16498c7aaa3c71526ce.tar.gz
cowboy-d7761b52592e4ca8192cf16498c7aaa3c71526ce.tar.bz2
cowboy-d7761b52592e4ca8192cf16498c7aaa3c71526ce.zip
Remove another test from the old http suite
Diffstat (limited to 'test')
-rw-r--r--test/handlers/resp_h.erl6
-rw-r--r--test/http_SUITE.erl8
-rw-r--r--test/req_SUITE.erl5
3 files changed, 11 insertions, 8 deletions
diff --git a/test/handlers/resp_h.erl b/test/handlers/resp_h.erl
index 19686ff..9dae612 100644
--- a/test/handlers/resp_h.erl
+++ b/test/handlers/resp_h.erl
@@ -195,6 +195,12 @@ do(<<"stream_body">>, Req0, Opts) ->
cowboy_req:stream_body(<<"Hello world!">>, nofin, Req),
cowboy_req:stream_body(<<>>, fin, Req),
{ok, Req, Opts};
+ <<"multiple">> ->
+ Req = cowboy_req:stream_reply(200, Req0),
+ cowboy_req:stream_body(<<"Hello ">>, nofin, Req),
+ cowboy_req:stream_body(<<"world">>, nofin, Req),
+ cowboy_req:stream_body(<<"!">>, fin, Req),
+ {ok, Req, Opts};
<<"nofin">> ->
Req = cowboy_req:stream_reply(200, Req0),
cowboy_req:stream_body(<<"Hello world!">>, nofin, Req),
diff --git a/test/http_SUITE.erl b/test/http_SUITE.erl
index 2b5219d..c2e7912 100644
--- a/test/http_SUITE.erl
+++ b/test/http_SUITE.erl
@@ -211,14 +211,6 @@ check_status(Config) ->
{Ret, URL}
end || {Status, URL} <- Tests].
-chunked_response(Config) ->
- ConnPid = gun_open(Config),
- Ref = gun:get(ConnPid, "/chunked_response"),
- {response, nofin, 200, Headers} = gun:await(ConnPid, Ref),
- true = lists:keymember(<<"transfer-encoding">>, 1, Headers),
- {ok, <<"chunked_handler\r\nworks fine!">>} = gun:await_body(ConnPid, Ref),
- ok.
-
%% Check if sending requests whose size is around the MTU breaks something.
echo_body(Config) ->
MTU = ct_helper:get_loopback_mtu(),
diff --git a/test/req_SUITE.erl b/test/req_SUITE.erl
index 4c6e2f8..03414cd 100644
--- a/test/req_SUITE.erl
+++ b/test/req_SUITE.erl
@@ -827,6 +827,11 @@ stream_reply3(Config) ->
{500, _, _} = do_get("/resp/stream_reply3/error", Config),
ok.
+stream_body_multiple(Config) ->
+ doc("Streamed body via multiple calls."),
+ {200, _, <<"Hello world!">>} = do_get("/resp/stream_body/multiple", Config),
+ ok.
+
stream_body_fin0(Config) ->
doc("Streamed body with last chunk of size 0."),
{200, _, <<"Hello world!">>} = do_get("/resp/stream_body/fin0", Config),