aboutsummaryrefslogtreecommitdiffstats
path: root/test/http_SUITE.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-06-28 13:07:44 +0200
committerLoïc Hoguin <[email protected]>2017-06-28 13:07:44 +0200
commit3eb7693e4fd7e1172b55b30ab25c5656040d1fd2 (patch)
tree20106b0a1374146f9c446b44fa71429d82697c18 /test/http_SUITE.erl
parentf425f7478a12cf69b163ba2a01a37457476c0228 (diff)
downloadcowboy-3eb7693e4fd7e1172b55b30ab25c5656040d1fd2.tar.gz
cowboy-3eb7693e4fd7e1172b55b30ab25c5656040d1fd2.tar.bz2
cowboy-3eb7693e4fd7e1172b55b30ab25c5656040d1fd2.zip
Remove outdated multipart tests
They have equivalents in req_SUITE.
Diffstat (limited to 'test/http_SUITE.erl')
-rw-r--r--test/http_SUITE.erl58
1 files changed, 0 insertions, 58 deletions
diff --git a/test/http_SUITE.erl b/test/http_SUITE.erl
index e57e384..2cd8387 100644
--- a/test/http_SUITE.erl
+++ b/test/http_SUITE.erl
@@ -160,8 +160,6 @@ init_dispatch(Config) ->
[{etag, ?MODULE, do_etag_gen}]}},
{"/static_specify_file/[...]", cowboy_static,
{file, config(static_dir, Config) ++ "/style.css"}},
- {"/multipart", http_multipart, []},
- {"/multipart/large", http_multipart_stream, []},
{"/echo/body", http_echo_body, []},
{"/echo/body_qs", http_body_qs, []},
{"/crash/content-length", input_crash_h, content_length},
@@ -446,62 +444,6 @@ keepalive_stream_loop(Config) ->
end || Ref <- Refs],
ok.
-multipart(Config) ->
- ConnPid = gun_open(Config),
- Body = <<
- "This is a preamble."
- "\r\n--OHai\r\nX-Name:answer\r\n\r\n42"
- "\r\n--OHai\r\nServer:Cowboy\r\n\r\nIt rocks!\r\n"
- "\r\n--OHai--\r\n"
- "This is an epilogue."
- >>,
- Ref = gun:post(ConnPid, "/multipart",
- [{<<"content-type">>, <<"multipart/x-makes-no-sense; boundary=OHai">>}],
- Body),
- {response, nofin, 200, _} = gun:await(ConnPid, Ref),
- {ok, RespBody} = gun:await_body(ConnPid, Ref),
- Parts = binary_to_term(RespBody),
- Parts = [
- {[{<<"x-name">>, <<"answer">>}], <<"42">>},
- {[{<<"server">>, <<"Cowboy">>}], <<"It rocks!\r\n">>}
- ],
- ok.
-
-multipart_chunked(Config) ->
- ConnPid = gun_open(Config),
- Body = <<
- "This is a preamble."
- "\r\n--OHai\r\nX-Name:answer\r\n\r\n42"
- "\r\n--OHai\r\nServer:Cowboy\r\n\r\nIt rocks!\r\n"
- "\r\n--OHai--\r\n"
- "This is an epilogue."
- >>,
- Ref = gun:post(ConnPid, "/multipart",
- [{<<"content-type">>, <<"multipart/x-makes-no-sense; boundary=OHai">>}]),
- gun:data(ConnPid, Ref, fin, Body),
- {response, nofin, 200, _} = gun:await(ConnPid, Ref),
- {ok, RespBody} = gun:await_body(ConnPid, Ref),
- Parts = binary_to_term(RespBody),
- Parts = [
- {[{<<"x-name">>, <<"answer">>}], <<"42">>},
- {[{<<"server">>, <<"Cowboy">>}], <<"It rocks!\r\n">>}
- ],
- ok.
-
-multipart_large(Config) ->
- ConnPid = gun_open(Config),
- Boundary = "----------",
- Big = << 0:9000000/unit:8 >>,
- Bigger = << 0:9999999/unit:8 >>,
- Body = ["--", Boundary, "\r\ncontent-length: 9000000\r\n\r\n", Big, "\r\n",
- "--", Boundary, "\r\ncontent-length: 9999999\r\n\r\n", Bigger, "\r\n",
- "--", Boundary, "--\r\n"],
- Ref = gun:post(ConnPid, "/multipart/large",
- [{<<"content-type">>, ["multipart/x-large; boundary=", Boundary]}],
- Body),
- {response, fin, 200, _} = gun:await(ConnPid, Ref),
- ok.
-
do_nc(Config, Input) ->
Cat = os:find_executable("cat"),
Nc = os:find_executable("nc"),