Mercurial > hg > nginx-tests
diff syslog.t @ 1580:9e142c0e34b2
Tests: allowed syslog messages arrival out-of-order.
Reported by Dionna Amalie Glaze, see
http://mailman.nginx.org/pipermail/nginx-devel/2020-June/013294.html
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Mon, 06 Jul 2020 18:01:10 +0300 |
parents | 0f2dd1f239ba |
children | b61e820caa83 |
line wrap: on
line diff
--- a/syslog.t +++ b/syslog.t @@ -26,7 +26,7 @@ select STDOUT; $| = 1; plan(skip_all => 'win32') if $^O eq 'MSWin32'; -my $t = Test::Nginx->new()->has(qw/http limit_req/)->plan(61); +my $t = Test::Nginx->new()->has(qw/http limit_req/)->plan(62); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -220,7 +220,8 @@ http_get('/if/work?logme=yes'); get_syslog('/a'); -like($t->read_file('s_if.log'), qr/good:404.*work:404/s, 'syslog if success'); +like($t->read_file('s_if.log'), qr/good:404/s, 'syslog if success'); +like($t->read_file('s_if.log'), qr/work:404/s, 'syslog if success 2'); unlike($t->read_file('s_if.log'), qr/(if:|empty:|zero:)404/, 'syslog if fail'); like(get_syslog('/nohostname'),