Mercurial > hg > nginx-tests
changeset 468:684278f71783
Tests: the "limit_zone" directive was removed.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Wed, 24 Sep 2014 23:56:41 +0400 |
parents | 43e05ac6c23c |
children | 1c5a8265f386 |
files | limit_conn.t |
diffstat | 1 files changed, 1 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/limit_conn.t Mon Sep 22 13:30:04 2014 +0400 +++ b/limit_conn.t Wed Sep 24 23:56:41 2014 +0400 @@ -25,7 +25,7 @@ plan(skip_all => 'win32') if $^O eq 'MSWin32'; -my $t = Test::Nginx->new()->has(qw/http proxy limit_conn limit_req/)->plan(10); +my $t = Test::Nginx->new()->has(qw/http proxy limit_conn limit_req/)->plan(8); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -44,7 +44,6 @@ limit_conn_zone $binary_remote_addr zone=zone:1m; limit_conn_zone $binary_remote_addr zone=zone2:1m; limit_conn_zone $binary_remote_addr zone=custom:1m; - limit_zone legacy $binary_remote_addr 1m; server { listen 127.0.0.1:8081; @@ -82,19 +81,12 @@ limit_conn_status 501; limit_conn custom 1; } - - location /legacy { - proxy_pass http://127.0.0.1:8081/; - limit_conn legacy 1; - } } } EOF -open OLDERR, ">&", \*STDERR; close STDERR; $t->run(); -open STDERR, ">&", \*OLDERR; ############################################################################### @@ -121,14 +113,6 @@ qr/limiting connections by zone "custom"/s, 'limit_conn_log_level'); -# limit_zone - -$s = http_get('/legacy/w', start => 1); -like(http_get('/legacy'), qr/^HTTP\/1.. 503 /, 'legacy rejected'); - -$s->close; -unlike(http_get('/legacy'), qr/^HTTP\/.. 503 /, 'legacy passed'); - # limited after unlimited $s = http_get('/w', start => 1);