Mercurial > hg > nginx-tests
diff scgi.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/scgi.t +++ b/scgi.t @@ -24,7 +24,7 @@ select STDOUT; $| = 1; eval { require SCGI; }; plan(skip_all => 'SCGI not installed') if $@; -my $t = Test::Nginx->new()->has(qw/http scgi/)->plan(6) +my $t = Test::Nginx->new()->has(qw/http scgi/)->plan(7) ->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -37,6 +37,10 @@ events { http { %%TEST_GLOBALS_HTTP%% + upstream u { + server 127.0.0.1:8081; + } + server { listen 127.0.0.1:8080; server_name localhost; @@ -74,6 +78,7 @@ like(http_get_headers('/headers'), qr/SE 'scgi request with many ignored headers'); like(http_get('/var?b=127.0.0.1:8081'), qr/SEE-THIS/, 'scgi with variables'); +like(http_get('/var?b=u'), qr/SEE-THIS/, 'scgi with variables to upstream'); ###############################################################################