# HG changeset patch # User Sergey Kandaurov # Date 1493897469 -10800 # Node ID cf14cfe9ec8cc534b8674221eb8641bfa61c283f # Parent 518d1c865812b7bac6b870b2a9eab6250b3722f2 Tests: dropped obsolete ipv6 prerequisite. diff --git a/access.t b/access.t --- 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'); diff --git a/debug_connection.t b/debug_connection.t --- 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'); diff --git a/debug_connection_syslog.t b/debug_connection_syslog.t --- 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'); diff --git a/geo_ipv6.t b/geo_ipv6.t --- 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%% diff --git a/geoip.t b/geoip.t --- 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%% diff --git a/http_resolver_aaaa.t b/http_resolver_aaaa.t --- 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'); diff --git a/lib/Test/Nginx.pm b/lib/Test/Nginx.pm --- 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; } diff --git a/proxy.t b/proxy.t --- 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 diff --git a/proxy_protocol.t b/proxy_protocol.t --- 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); diff --git a/proxy_protocol_ipv6.t b/proxy_protocol_ipv6.t --- 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'); diff --git a/proxy_protocol_port.t b/proxy_protocol_port.t --- 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%% diff --git a/ssl_proxy_protocol.t b/ssl_proxy_protocol.t --- 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); diff --git a/stream_access.t b/stream_access.t --- 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'); diff --git a/stream_geo_ipv6.t b/stream_geo_ipv6.t --- 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%% diff --git a/stream_geoip.t b/stream_geoip.t --- 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'); diff --git a/stream_proxy_protocol_ipv6.t b/stream_proxy_protocol_ipv6.t --- 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%% diff --git a/stream_realip.t b/stream_realip.t --- 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%% diff --git a/stream_ssl_realip.t b/stream_ssl_realip.t --- 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'); diff --git a/stream_variables.t b/stream_variables.t --- 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');