diff uwsgi.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 dc2f8aac0553
children eca9b1d19021
line wrap: on
line diff
--- a/uwsgi.t
+++ b/uwsgi.t
@@ -21,7 +21,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http uwsgi/)->has_daemon('uwsgi')->plan(3)
+my $t = Test::Nginx->new()->has(qw/http uwsgi/)->has_daemon('uwsgi')->plan(4)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -43,6 +43,11 @@ http {
             uwsgi_param SERVER_PROTOCOL $server_protocol;
             uwsgi_param HTTP_X_BLAH "blah";
         }
+
+        location /var {
+            uwsgi_pass $arg_b;
+            uwsgi_param SERVER_PROTOCOL $server_protocol;
+        }
     }
 }
 
@@ -81,6 +86,8 @@ unlike(http_head('/head'), qr/SEE-THIS/,
 like(http_get_headers('/headers'), qr/SEE-THIS/,
 	'uwsgi request with many ignored headers');
 
+like(http_get('/var?b=127.0.0.1:8081'), qr/SEE-THIS/, 'uwsgi with variables');
+
 ###############################################################################
 
 sub http_get_headers {