changeset 1170:cf14cfe9ec8c

Tests: dropped obsolete ipv6 prerequisite.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 04 May 2017 14:31:09 +0300
parents 518d1c865812
children cdbdb75cf194
files access.t debug_connection.t debug_connection_syslog.t geo_ipv6.t geoip.t http_resolver_aaaa.t lib/Test/Nginx.pm proxy.t proxy_protocol.t proxy_protocol_ipv6.t proxy_protocol_port.t ssl_proxy_protocol.t stream_access.t stream_geo_ipv6.t stream_geoip.t stream_proxy_protocol_ipv6.t stream_realip.t stream_ssl_realip.t stream_variables.t
diffstat 19 files changed, 18 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/access.t
+++ b/access.t
@@ -23,7 +23,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http proxy access ipv6 unix/);
+my $t = Test::Nginx->new()->has(qw/http proxy access unix/);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
--- a/debug_connection.t
+++ b/debug_connection.t
@@ -21,7 +21,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http --with-debug ipv6 proxy/);
+my $t = Test::Nginx->new()->has(qw/http --with-debug proxy/);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
--- a/debug_connection_syslog.t
+++ b/debug_connection_syslog.t
@@ -23,7 +23,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http --with-debug ipv6 proxy/);
+my $t = Test::Nginx->new()->has(qw/http --with-debug proxy/);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
--- a/geo_ipv6.t
+++ b/geo_ipv6.t
@@ -22,7 +22,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http geo ipv6/)
+my $t = Test::Nginx->new()->has(qw/http geo/)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
--- a/geoip.t
+++ b/geoip.t
@@ -22,7 +22,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http http_geoip ipv6/)
+my $t = Test::Nginx->new()->has(qw/http http_geoip/)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
--- a/http_resolver_aaaa.t
+++ b/http_resolver_aaaa.t
@@ -22,7 +22,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http proxy rewrite ipv6/);
+my $t = Test::Nginx->new()->has(qw/http proxy rewrite/);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
--- a/lib/Test/Nginx.pm
+++ b/lib/Test/Nginx.pm
@@ -233,10 +233,6 @@ sub has_feature($) {
 		return $^O ne 'MSWin32';
 	}
 
-	if ($feature eq 'ipv6') {
-		return $self->has_version('1.11.5');
-	}
-
 	return 0;
 }
 
--- a/proxy.t
+++ b/proxy.t
@@ -81,8 +81,7 @@ like(http_get('/var?b=127.0.0.1:' . port
 like(http_get('/var?b=u/'), qr/SEE-THIS/, 'proxy with variables to upstream');
 
 SKIP: {
-skip 'no ipv6', 1 unless $t->has_module('ipv6') or $t->has_feature('ipv6')
-	and socket(my $s, &AF_INET6, &SOCK_STREAM, 0);
+skip 'no ipv6', 1 unless socket(my $s, &AF_INET6, &SOCK_STREAM, 0);
 
 TODO: {
 todo_skip 'heap-buffer-overflow', 1
--- a/proxy_protocol.t
+++ b/proxy_protocol.t
@@ -24,7 +24,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http access ipv6 realip/);
+my $t = Test::Nginx->new()->has(qw/http access realip/);
 
 $t->write_file_expand('nginx.conf', <<'EOF')->plan(18);
 
--- a/proxy_protocol_ipv6.t
+++ b/proxy_protocol_ipv6.t
@@ -22,7 +22,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http ipv6 realip stream/);
+my $t = Test::Nginx->new()->has(qw/http realip stream/);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
--- a/proxy_protocol_port.t
+++ b/proxy_protocol_port.t
@@ -24,7 +24,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http ipv6 realip/)
+my $t = Test::Nginx->new()->has(qw/http realip/)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
--- a/ssl_proxy_protocol.t
+++ b/ssl_proxy_protocol.t
@@ -29,7 +29,7 @@ plan(skip_all => 'IO::Socket::SSL not in
 eval { IO::Socket::SSL::SSL_VERIFY_NONE(); };
 plan(skip_all => 'IO::Socket::SSL too old') if $@;
 
-my $t = Test::Nginx->new()->has(qw/http http_ssl access ipv6 realip/)
+my $t = Test::Nginx->new()->has(qw/http http_ssl access realip/)
 	->has_daemon('openssl');
 
 $t->write_file_expand('nginx.conf', <<'EOF')->plan(18);
--- a/stream_access.t
+++ b/stream_access.t
@@ -23,7 +23,7 @@ use Test::Nginx::Stream qw/ stream /;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/stream stream_access ipv6 unix/);
+my $t = Test::Nginx->new()->has(qw/stream stream_access unix/);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
--- a/stream_geo_ipv6.t
+++ b/stream_geo_ipv6.t
@@ -24,7 +24,7 @@ select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
 my $t = Test::Nginx->new()->has(qw/stream stream_return stream_map stream_geo/)
-	->has(qw/ipv6/)->write_file_expand('nginx.conf', <<'EOF');
+	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
 
--- a/stream_geoip.t
+++ b/stream_geoip.t
@@ -25,7 +25,7 @@ use Test::Nginx::Stream qw/ stream /;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/stream stream_geoip stream_return ipv6/)
+my $t = Test::Nginx->new()->has(qw/stream stream_geoip stream_return/)
 	->has('stream_realip');
 
 $t->write_file_expand('nginx.conf', <<'EOF');
--- a/stream_proxy_protocol_ipv6.t
+++ b/stream_proxy_protocol_ipv6.t
@@ -26,7 +26,7 @@ use Test::Nginx::Stream qw/ stream /;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/stream ipv6/)
+my $t = Test::Nginx->new()->has(qw/stream/)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
--- a/stream_realip.t
+++ b/stream_realip.t
@@ -26,7 +26,7 @@ use Test::Nginx::Stream qw/ stream /;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/stream stream_return stream_realip ipv6/)
+my $t = Test::Nginx->new()->has(qw/stream stream_return stream_realip/)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
--- a/stream_ssl_realip.t
+++ b/stream_ssl_realip.t
@@ -30,7 +30,7 @@ plan(skip_all => 'IO::Socket::SSL not in
 eval { IO::Socket::SSL::SSL_VERIFY_NONE(); };
 plan(skip_all => 'IO::Socket::SSL too old') if $@;
 
-my $t = Test::Nginx->new()->has(qw/stream stream_return stream_realip ipv6/)
+my $t = Test::Nginx->new()->has(qw/stream stream_return stream_realip/)
 	->has(qw/stream_ssl/)->has_daemon('openssl')
 	->write_file_expand('nginx.conf', <<'EOF');
 
--- a/stream_variables.t
+++ b/stream_variables.t
@@ -23,7 +23,7 @@ use Test::Nginx::Stream qw/ stream dgram
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/stream stream_return ipv6 udp/);
+my $t = Test::Nginx->new()->has(qw/stream stream_return udp/);
 
 $t->write_file_expand('nginx.conf', <<'EOF');