Mercurial > hg > nginx-tests
diff proxy.t @ 974:882267679006
Tests: simplified parallel modifications in tests.
Mail tests were simplified in c227348453db.
author | Andrey Zelenkov <zelenkov@nginx.com> |
---|---|
date | Tue, 12 Jul 2016 17:39:03 +0300 |
parents | e9064d691790 |
children | e4d5e7afb6e0 |
line wrap: on
line diff
--- a/proxy.t +++ b/proxy.t @@ -38,15 +38,15 @@ http { %%TEST_GLOBALS_HTTP%% upstream u { - server 127.0.0.1:%%PORT_1%%; + server 127.0.0.1:8081; } server { - listen 127.0.0.1:%%PORT_0%%; + listen 127.0.0.1:8080; server_name localhost; location / { - proxy_pass http://127.0.0.1:%%PORT_1%%; + proxy_pass http://127.0.0.1:8081; proxy_read_timeout 1s; proxy_connect_timeout 2s; } @@ -61,7 +61,7 @@ http { EOF $t->run_daemon(\&http_daemon); -$t->run()->waitforsocket('127.0.0.1:' . port(1)); +$t->run()->waitforsocket('127.0.0.1:' . port(8081)); ############################################################################### @@ -70,7 +70,7 @@ like(http_get('/multi'), qr/AND-THIS/, ' unlike(http_head('/'), qr/SEE-THIS/, 'proxy head request'); -like(http_get('/var?b=127.0.0.1:' . port(1) . '/'), qr/SEE-THIS/, +like(http_get('/var?b=127.0.0.1:' . port(8081) . '/'), qr/SEE-THIS/, 'proxy with variables'); like(http_get('/var?b=u/'), qr/SEE-THIS/, 'proxy with variables to upstream'); @@ -99,7 +99,7 @@ like(http_get('/', socket => $s), qr/200 sub http_daemon { my $server = IO::Socket::INET->new( Proto => 'tcp', - LocalHost => '127.0.0.1:' . port(1), + LocalHost => '127.0.0.1:' . port(8081), Listen => 5, Reuse => 1 )