comparison limit_conn.t @ 469:1c5a8265f386

Tests: fixed matching for limit_conn_log_level. A debug log can contain non-ASCII characters.
author Valentin Bartenev <vbart@nginx.com>
date Wed, 24 Sep 2014 23:56:41 +0400
parents 684278f71783
children b86c05516e65
comparison
equal deleted inserted replaced
468:684278f71783 469:1c5a8265f386
107 # custom error code and log level 107 # custom error code and log level
108 108
109 $s = http_get('/custom/w', start => 1); 109 $s = http_get('/custom/w', start => 1);
110 like(http_get('/custom'), qr/^HTTP\/1.. 501 /, 'limit_conn_status'); 110 like(http_get('/custom'), qr/^HTTP\/1.. 501 /, 'limit_conn_status');
111 111
112 like(`grep -F '[info]' ${\($t->testdir())}/error.log`, 112 like($t->read_file('error.log'),
113 qr/limiting connections by zone "custom"/s, 113 qr/\[info\].*limiting connections by zone "custom"/,
114 'limit_conn_log_level'); 114 'limit_conn_log_level');
115 115
116 # limited after unlimited 116 # limited after unlimited
117 117
118 $s = http_get('/w', start => 1); 118 $s = http_get('/w', start => 1);