4 t_plan
10 "rack.input client_max_body_size bigger"
6 t_begin
"setup and startup" && {
7 rtmpfiles curl_out curl_err cmbs_config
9 sed -e 's/client_max_body_size.*/client_max_body_size 10485760/' \
10 < $unicorn_config > $cmbs_config
11 rainbows
-D sha1-random-size.ru
-c $cmbs_config
15 t_begin
"stops a regular request" && {
17 dd if=/dev
/zero bs
=102485761 count
=1 of
=$tmp
18 curl
-vsSf -T $tmp -H Expect
: \
19 http
://$listen/ > $curl_out 2> $curl_err ||
> $ok
25 t_begin
"stops a large chunked request" && {
27 dd if=/dev
/zero bs
=102485761 count
=1 | \
28 curl
-vsSf -T- -H Expect
: \
29 http
://$listen/ > $curl_out 2> $curl_err ||
> $ok
35 t_begin
"small size sha1 chunked ok" && {
36 blob_sha1
=b376885ac8452b6cbf9ced81b1080bfd570d9b91
38 dd if=/dev
/zero bs
=256 count
=1 | \
39 curl
-vsSf -T- -H Expect
: \
40 http
://$listen/ > $curl_out 2> $curl_err
43 test "$(cat $curl_out)" = $blob_sha1
46 t_begin
"small size sha1 content-length ok" && {
47 blob_sha1
=b376885ac8452b6cbf9ced81b1080bfd570d9b91
49 dd if=/dev
/zero bs
=256 count
=1 of
=$tmp
50 curl
-vsSf -T $tmp -H Expect
: \
51 http
://$listen/ > $curl_out 2> $curl_err
54 test "$(cat $curl_out)" = $blob_sha1
57 t_begin
"right size sha1 chunked ok" && {
58 blob_sha1
=8c206a1a87599f532ce68675536f0b1546900d7a
60 dd if=/dev
/zero bs
=10485760 count
=1 | \
61 curl
-vsSf -T- -H Expect
: \
62 http
://$listen/ > $curl_out 2> $curl_err
65 test "$(cat $curl_out)" = $blob_sha1
68 t_begin
"right size sha1 content-length ok" && {
69 blob_sha1
=8c206a1a87599f532ce68675536f0b1546900d7a
71 dd if=/dev
/zero bs
=10485760 count
=1 of
=$tmp
72 curl
-vsSf -T $tmp -H Expect
: \
73 http
://$listen/ > $curl_out 2> $curl_err
76 test "$(cat $curl_out)" = $blob_sha1
79 t_begin
"default size sha1 chunked ok" && {
80 blob_sha1
=3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3
82 dd if=/dev
/zero bs
=1048576 count
=1 | \
83 curl
-vsSf -T- -H Expect
: \
84 http
://$listen/ > $curl_out 2> $curl_err
87 test "$(cat $curl_out)" = $blob_sha1
90 t_begin
"default size sha1 content-length ok" && {
91 blob_sha1
=3b71f43ff30f4b15b5cd85dd9e95ebc7e84eb5a3
93 dd if=/dev
/zero bs
=1048576 count
=1 of
=$tmp
94 curl
-vsSf -T $tmp -H Expect
: \
95 http
://$listen/ > $curl_out 2> $curl_err
98 test "$(cat $curl_out)" = $blob_sha1
101 t_begin
"shutdown" && {