changeset 618:2d9f5f439598

Tests: added stream proxy protocol availability check.
author Andrey Zelenkov <zelenkov@nginx.com>
date Mon, 29 Jun 2015 18:37:02 +0300
parents 35832048546e
children 58a67c40a761
files stream_proxy_protocol.t stream_proxy_protocol_ipv6.t
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/stream_proxy_protocol.t
+++ b/stream_proxy_protocol.t
@@ -25,7 +25,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/stream/)->plan(2)
+my $t = Test::Nginx->new()->has(qw/stream/)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -53,7 +53,8 @@ stream {
 EOF
 
 $t->run_daemon(\&stream_daemon);
-$t->run()->waitforsocket('127.0.0.1:8081');
+$t->try_run('no stream proxy_protocol')->plan(2);
+$t->waitforsocket('127.0.0.1:8081');
 
 ###############################################################################
 
--- a/stream_proxy_protocol_ipv6.t
+++ b/stream_proxy_protocol_ipv6.t
@@ -67,7 +67,7 @@ stream {
 EOF
 
 $t->run_daemon(\&stream_daemon);
-$t->try_run('no inet6 support')->plan(2);
+$t->try_run('no inet6 support or stream proxy_protocol')->plan(2);
 $t->waitforsocket('127.0.0.1:8082');
 
 ###############################################################################