Mercurial > hg > nginx-tests
diff fastcgi_merge_params.t @ 952:e9064d691790
Tests: converted tests to run in parallel.
author | Andrey Zelenkov <zelenkov@nginx.com> |
---|---|
date | Tue, 21 Jun 2016 16:39:13 +0300 |
parents | fa71c725d40a |
children | 882267679006 |
line wrap: on
line diff
--- a/fastcgi_merge_params.t +++ b/fastcgi_merge_params.t @@ -46,22 +46,22 @@ http { fastcgi_param HTTP_X_BLAH "blah"; server { - listen 127.0.0.1:8080; + listen 127.0.0.1:%%PORT_0%%; server_name localhost; fastcgi_cache NAME; location / { - fastcgi_pass 127.0.0.1:8081; + fastcgi_pass 127.0.0.1:%%PORT_1%%; } location /no/ { - fastcgi_pass 127.0.0.1:8081; + fastcgi_pass 127.0.0.1:%%PORT_1%%; fastcgi_cache off; } location /custom/ { - fastcgi_pass 127.0.0.1:8081; + fastcgi_pass 127.0.0.1:%%PORT_1%%; fastcgi_param HTTP_X_BLAH "custom"; } } @@ -70,7 +70,7 @@ http { EOF $t->run_daemon(\&fastcgi_daemon); -$t->run()->waitforsocket('127.0.0.1:8081'); +$t->run()->waitforsocket('127.0.0.1:' . port(1)); ############################################################################### @@ -112,7 +112,7 @@ EOF ############################################################################### sub fastcgi_daemon { - my $socket = FCGI::OpenSocket('127.0.0.1:8081', 5); + my $socket = FCGI::OpenSocket('127.0.0.1:' . port(1), 5); my $request = FCGI::Request(\*STDIN, \*STDOUT, \*STDERR, \%ENV, $socket); @@ -125,7 +125,7 @@ sub fastcgi_daemon { my $blah = $ENV{HTTP_X_BLAH}; print <<EOF; -Location: http://127.0.0.1:8080/redirect +Location: http://localhost/redirect Content-Type: text/html ims=$ims;iums=$iums;blah=$blah;