Mercurial > hg > nginx-tests
changeset 432:c1269426585d
Tests: test for implicit upstream with IP literal and variable.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 11 Jul 2014 16:37:56 +0400 |
parents | 05c46688b54b |
children | 4a045c74a77c |
files | proxy.t |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/proxy.t +++ b/proxy.t @@ -21,7 +21,7 @@ use Test::Nginx; select STDERR; $| = 1; select STDOUT; $| = 1; -my $t = Test::Nginx->new()->has(qw/http proxy/)->plan(3); +my $t = Test::Nginx->new()->has(qw/http proxy/)->plan(4); $t->write_file_expand('nginx.conf', <<'EOF'); @@ -43,6 +43,9 @@ http { proxy_pass http://127.0.0.1:8081; proxy_read_timeout 1s; } + location /var { + proxy_pass http://$arg_ip:$arg_port/; + } } } @@ -58,6 +61,9 @@ like(http_get('/multi'), qr/AND-THIS/, ' unlike(http_head('/'), qr/SEE-THIS/, 'proxy head request'); +like(http_get('/var?ip=127.0.0.1&port=8081'), qr/SEE-THIS/, + 'proxy url with IP literal and variable'); + ############################################################################### sub http_daemon {