3 t_plan
6 "config variables conflict with preload_app"
5 t_begin
"setup and start" && {
10 use Rack
::ContentLength
11 use Rack
::ContentType
, "text/plain"
12 config
= ru
= { "hello" => "world" }
13 run lambda
{ |env|
[ 200, {}, [ ru.inspect
<< "\n" ] ] }
15 echo 'preload_app true' >> $unicorn_config
16 unicorn
-D -c $unicorn_config $ru
20 t_begin
"hit with curl" && {
21 out
=$
(curl
-sSf http
://$listen/)
22 test x
"$out" = x
'{"hello"=>"world"}'
25 t_begin
"modify rackup file" && {
26 sed -e 's/world/WORLD/' < $ru > $rutmp
30 t_begin
"reload signal succeeds" && {
31 kill -HUP $unicorn_pid
32 while ! egrep '(done|error) reloading' < $r_err >/dev
/null
37 grep 'done reloading' $r_err >/dev
/null
40 t_begin
"hit with curl" && {
41 out
=$
(curl
-sSf http
://$listen/)
42 test x
"$out" = x
'{"hello"=>"WORLD"}'
45 t_begin
"killing succeeds" && {