From e812eb864f88d88bb5e6bfdba617b03db2f07bfe Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 6 Jun 2010 02:33:22 +0000 Subject: tests: t9001: avoid needless filesystem activity --- t/t9001-sendfile-to-path.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 't') 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" && { -- cgit v1.2.3-24-ge0c7