diff stream_geoip.t @ 1235:3fc6817cd84a

Tests: explicit peer port in stream tests now required. Notably, this eliminates extra port acquire for the default port number in cases when it was not actually used.
author Andrey Zelenkov <zelenkov@nginx.com>
date Thu, 26 Oct 2017 16:36:13 +0300
parents cf14cfe9ec8c
children f3ba4c74de31
line wrap: on
line diff
--- a/stream_geoip.t
+++ b/stream_geoip.t
@@ -178,7 +178,8 @@ is($data{country_name}, 'United States',
 sub stream_pp {
 	my ($ip) = @_;
 	my $type = ($ip =~ ':' ? 'TCP6' : 'TCP4');
-	return stream()->io("PROXY $type $ip 127.0.0.1 8080 8080${CRLF}");
+	return stream('127.0.0.1:' . port(8080))
+		->io("PROXY $type $ip 127.0.0.1 8080 8080${CRLF}");
 }
 
 sub pack_node {