3 skip_models StreamResponseEpoll
4 test -r random_blob || die
"random_blob required, run with 'make $0'"
5 req_curl_chunked_upload_err_check
7 t_plan
6 "rack.input client_max_body_size default"
9 t_begin
"setup and startup" && {
10 rtmpfiles curl_out curl_err cmbs_config
12 grep -v client_max_body_size
< $unicorn_config > $cmbs_config
13 rainbows
-D sha1-random-size.ru
-c $cmbs_config
17 t_begin
"regular request" && {
19 curl
-vsSf -T random_blob
-H Expect
: \
20 http
://$listen/ > $curl_out 2> $curl_err ||
> $ok
26 t_begin
"chunked request" && {
28 curl
-vsSf -T- < random_blob
-H Expect
: \
29 http
://$listen/ > $curl_out 2> $curl_err ||
> $ok
35 t_begin
"default size sha1 chunked" && {
36 blob_sha1
=3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3
39 dd if=/dev
/zero bs
=1048576 count
=1 | \
40 curl
-vsSf -T- -H Expect
: \
41 http
://$listen/ > $curl_out 2> $curl_err
42 test "$(cat $curl_out)" = $blob_sha1
47 t_begin
"default size sha1 content-length" && {
48 blob_sha1
=3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3
50 dd if=/dev
/zero bs
=1048576 count
=1 of
=$tmp
51 curl
-vsSf -T $tmp -H Expect
: \
52 http
://$listen/ > $curl_out 2> $curl_err
53 test "$(cat $curl_out)" = $blob_sha1
58 t_begin
"shutdown" && {