diff fastcgi.t @ 801:d95c4b8e5517

Tests: more tests for passing requests to host given by expression. This complements tests for scgi_pass, fastcgi_pass, uwsgi_pass with variables that evaluate to an implicit upstream.
author Sergey Kandaurov <pluknet@nginx.com>
date Wed, 09 Dec 2015 18:59:26 +0300
parents d5bf5942a8b2
children eca9b1d19021
line wrap: on
line diff
--- a/fastcgi.t
+++ b/fastcgi.t
@@ -25,7 +25,7 @@ eval { require FCGI; };
 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(5)
+my $t = Test::Nginx->new()->has(qw/http fastcgi/)->plan(6)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -46,6 +46,11 @@ http {
             fastcgi_pass 127.0.0.1:8081;
             fastcgi_param REQUEST_URI $request_uri;
         }
+
+        location /var {
+            fastcgi_pass $arg_b;
+            fastcgi_param REQUEST_URI $request_uri;
+        }
     }
 }
 
@@ -64,6 +69,8 @@ unlike(http_head('/'), qr/SEE-THIS/, 'no
 
 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');
+
 ###############################################################################
 
 sub fastcgi_daemon {