4 t_plan
9 "graceful handling of broken apps for $model"
6 t_begin
"setup and start" && {
7 rainbows_setup
$model 1
8 rainbows
-D t0009.ru
-c $unicorn_config
12 t_begin
"normal response is alright" && {
13 test xOK
= x
"$(curl -sSf http://$listen/)"
16 t_begin
"app raised exception" && {
17 curl
-sSf http
://$listen/raise
2> $tmp ||
:
22 t_begin
"app exception logged and backtrace not swallowed" && {
23 grep -F 'app error' $r_err
24 grep -A1 -F 'app error' $r_err |
tail -1 |
grep t0009.ru
:
29 t_begin
"trigger bad response" && {
30 curl
-sSf http
://$listen/nil
2> $tmp ||
:
35 t_begin
"app exception logged" && {
36 grep -F 'app error' $r_err
40 t_begin
"normal responses alright afterwards" && {
42 curl
-sSf http
://$listen/ >> $tmp &
43 curl
-sSf http
://$listen/ >> $tmp &
44 curl
-sSf http
://$listen/ >> $tmp &
45 curl
-sSf http
://$listen/ >> $tmp &
47 test xOK
= x$
(sort < $tmp |
uniq)
50 t_begin
"teardown" && {
54 t_begin
"check stderr" && check_stderr