diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-06-06 02:33:22 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-06-06 02:33:22 +0000 |
commit | e812eb864f88d88bb5e6bfdba617b03db2f07bfe (patch) | |
tree | d48aa80c1670fbcb5a6f9ed179397dcc7752ee18 | |
parent | b1315983056f91467b336aeb426759debc006a4e (diff) | |
download | rainbows-e812eb864f88d88bb5e6bfdba617b03db2f07bfe.tar.gz |
-rwxr-xr-x | t/t9001-sendfile-to-path.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/t/t9001-sendfile-to-path.sh b/t/t9001-sendfile-to-path.sh index aa75f22..88b9c34 100755 --- a/t/t9001-sendfile-to-path.sh +++ b/t/t9001-sendfile-to-path.sh @@ -4,25 +4,26 @@ t_plan 7 "Sendfile middleware test for $model" t_begin "configure and start" && { - rtmpfiles curl_out curl_err + rtmpfiles curl_err rainbows_setup # do not allow default middleware to be loaded since it may # kill body#to_path rainbows -E none -D t9001.ru -c $unicorn_config rainbows_wait_start + random_blob_sha1=$(rsha1 < random_blob) } t_begin "hit with curl" && { - curl -sSfv http://$listen/ > $curl_out 2> $curl_err + sha1=$(curl -sSfv http://$listen/ 2> $curl_err | rsha1) } t_begin "kill server" && { kill $rainbows_pid } -t_begin "file matches source" && { - cmp $curl_out random_blob +t_begin "SHA1 matches source" && { + test x$random_blob_sha1 = x$sha1 } t_begin "no errors in Rainbows! stderr" && { |