Mercurial > hg > nginx-tests
diff fastcgi.t @ 802:eca9b1d19021
Tests: tests for host expansion to an explicit upstream.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 09 Dec 2015 19:00:41 +0300 |
parents | d95c4b8e5517 |
children | e9064d691790 |
line wrap: on
line diff
--- a/fastcgi.t Wed Dec 09 18:59:26 2015 +0300 +++ b/fastcgi.t Wed Dec 09 19:00:41 2015 +0300 @@ -25,7 +25,7 @@ plan(skip_all => 'FCGI not installed') if $@; plan(skip_all => 'win32') if $^O eq 'MSWin32'; -my $t = Test::Nginx->new()->has(qw/http fastcgi/)->plan(6) +my $t = Test::Nginx->new()->has(qw/http fastcgi/)->plan(7) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -38,6 +38,10 @@ http { %%TEST_GLOBALS_HTTP%% + upstream u { + server 127.0.0.1:8081; + } + server { listen 127.0.0.1:8080; server_name localhost; @@ -70,6 +74,7 @@ like(http_get('/stderr'), qr/SEE-THIS/, 'large stderr handled'); like(http_get('/var?b=127.0.0.1:8081'), qr/SEE-THIS/, 'fastcgi with variables'); +like(http_get('/var?b=u'), qr/SEE-THIS/, 'fastcgi with variables to upstream'); ###############################################################################