3 t_plan
8 "reload restore settings for $model"
5 t_begin
"setup and start" && {
8 cat $unicorn_config > $orig_config
9 rainbows
-D -c $unicorn_config -l $listen env.ru
13 t_begin
"HTTP request confirms we're running the correct model" && {
14 curl
-sSfv http
://$listen/ |
grep "\"rainbows.model\"=>:$model"
17 t_begin
"clobber config and reload" && {
18 cat > $unicorn_config <<EOF
21 kill -HUP $rainbows_pid
26 t_begin
"HTTP request confirms we're on the default model" && {
27 curl
-sSfv http
://$listen/ | \
28 grep "\"rainbows.model\"=>:Base" >/dev
/null
31 t_begin
"restore config and reload" && {
32 cat $orig_config > $unicorn_config
34 kill -HUP $rainbows_pid
40 t_begin
"HTTP request confirms we're back on the correct model" && {
41 curl
-sSfv http
://$listen/ | \
42 grep "\"rainbows.model\"=>:$model" >/dev
/null
45 t_begin
"killing succeeds" && {
49 t_begin
"check stderr" && {