coolio+xepoll_thread*: use shutdown() for keepalive timeout
[rainbows.git] / t / t0102-rack-input-short.sh
blobdbdba91ef9d63a46b73c5503110b97f3ba4413f5
1 #!/bin/sh
2 . ./test-lib.sh
3 test -r random_blob || die "random_blob required, run with 'make $0'"
5 t_plan 4 "rack.input short read tests"
7 t_begin "setup and startup" && {
8 rtmpfiles curl_out curl_err
9 rainbows_setup $model
10 rainbows -D sha1-random-size.ru -c $unicorn_config
11 blob_sha1=$(rsha1 < random_blob)
12 t_info "blob_sha1=$blob_sha1"
13 rainbows_wait_start
16 t_begin "regular request" && {
17 curl -sSf -T random_blob http://$listen/ > $curl_out 2> $curl_err
18 test x$blob_sha1 = x$(cat $curl_out)
19 test ! -s $curl_err
22 t_begin "chunked request" && {
23 curl -sSf -T- < random_blob http://$listen/ > $curl_out 2> $curl_err
24 test x$blob_sha1 = x$(cat $curl_out)
25 test ! -s $curl_err
28 t_begin "shutdown" && {
29 kill $rainbows_pid
32 t_done