changeset 1171:cdbdb75cf194

Tests: dropped try_run() checks for hosts without IPv6 support. Tests for geoip are special as they depend on IPv6 support in the GeoIP library.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 04 May 2017 14:31:10 +0300
parents cf14cfe9ec8c
children 7e81d47faa07
files access.t debug_connection.t debug_connection_syslog.t geo_ipv6.t http_resolver_aaaa.t proxy.t proxy_protocol_ipv6.t stream_access.t stream_geo_ipv6.t stream_proxy_protocol_ipv6.t stream_realip.t stream_ssl_realip.t stream_variables.t
diffstat 13 files changed, 12 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/access.t
+++ b/access.t
@@ -80,7 +80,7 @@ http {
 
 EOF
 
-$t->try_run('no inet6 support')->plan(12);
+$t->run()->plan(12);
 
 ###############################################################################
 
--- a/debug_connection.t
+++ b/debug_connection.t
@@ -52,7 +52,7 @@ http {
 
 EOF
 
-$t->try_run('no inet6 support')->plan(5);
+$t->run()->plan(5);
 
 ###############################################################################
 
--- a/debug_connection_syslog.t
+++ b/debug_connection_syslog.t
@@ -54,7 +54,7 @@ http {
 
 EOF
 
-$t->try_run('no inet6 support')->plan(5);
+$t->run()->plan(5);
 
 ###############################################################################
 
--- a/geo_ipv6.t
+++ b/geo_ipv6.t
@@ -91,7 +91,7 @@ EOF
 
 $t->write_file('index.html', '');
 $t->write_file('addr', '');
-$t->try_run('no inet6 support');
+$t->run();
 
 plan(skip_all => 'no ::1 on host')
 	if http_get('/addr') !~ /X-IP: ::1/m;
--- a/http_resolver_aaaa.t
+++ b/http_resolver_aaaa.t
@@ -67,7 +67,7 @@ http {
 
 EOF
 
-$t->try_run('no inet6 support')->plan(72);
+$t->run()->plan(72);
 
 $t->run_daemon(\&dns_daemon, port(8081), $t);
 $t->run_daemon(\&dns_daemon, port(8082), $t);
--- a/proxy.t
+++ b/proxy.t
@@ -80,9 +80,6 @@ like(http_get('/var?b=127.0.0.1:' . port
 	'proxy with variables');
 like(http_get('/var?b=u/'), qr/SEE-THIS/, 'proxy with variables to upstream');
 
-SKIP: {
-skip 'no ipv6', 1 unless socket(my $s, &AF_INET6, &SOCK_STREAM, 0);
-
 TODO: {
 todo_skip 'heap-buffer-overflow', 1
 	unless $ENV{TEST_NGINX_UNSAFE} or $t->has_version('1.11.0');
@@ -91,8 +88,6 @@ ok(http_get("/var?b=[::]"), 'proxy with 
 
 }
 
-}
-
 like(http_get('/timeout'), qr/200 OK/, 'proxy connect timeout');
 
 ###############################################################################
--- a/proxy_protocol_ipv6.t
+++ b/proxy_protocol_ipv6.t
@@ -64,7 +64,7 @@ stream {
 EOF
 
 $t->write_file('t', 'SEE-THIS');
-$t->try_run('no inet6 support')->plan(3);
+$t->run()->plan(3);
 
 ###############################################################################
 
--- a/stream_access.t
+++ b/stream_access.t
@@ -146,7 +146,7 @@ stream {
 
 EOF
 
-$t->try_run('no inet6 support')->plan(18);
+$t->run()->plan(18);
 $t->run_daemon(\&stream_daemon);
 $t->waitforsocket('127.0.0.1:' . port(8080));
 
--- a/stream_geo_ipv6.t
+++ b/stream_geo_ipv6.t
@@ -86,7 +86,7 @@ stream {
 
 EOF
 
-$t->try_run('no stream geo and/or inet6 support')->plan(6);
+$t->try_run('no stream geo')->plan(6);
 
 ###############################################################################
 
--- a/stream_proxy_protocol_ipv6.t
+++ b/stream_proxy_protocol_ipv6.t
@@ -62,7 +62,7 @@ stream {
 EOF
 
 $t->run_daemon(\&stream_daemon);
-$t->try_run('no inet6 support')->plan(2);
+$t->run()->plan(2);
 $t->waitforsocket('127.0.0.1:' . port(8082));
 
 ###############################################################################
--- a/stream_realip.t
+++ b/stream_realip.t
@@ -82,7 +82,7 @@ stream {
 EOF
 
 $t->run_daemon(\&stream_daemon);
-$t->try_run('no stream proxy_protocol and/or inet6 support')->plan(8);
+$t->try_run('no stream proxy_protocol')->plan(8);
 $t->waitforsocket('127.0.0.1:' . port(8081));
 
 ###############################################################################
--- a/stream_ssl_realip.t
+++ b/stream_ssl_realip.t
@@ -101,7 +101,7 @@ foreach my $name ('localhost') {
 		or die "Can't create certificate for $name: $!\n";
 }
 
-$t->try_run('no stream proxy_protocol and/or inet6 support')->plan(6);
+$t->try_run('no stream proxy_protocol')->plan(6);
 
 ###############################################################################
 
--- a/stream_variables.t
+++ b/stream_variables.t
@@ -76,7 +76,7 @@ stream {
 
 EOF
 
-$t->try_run('no stream return and/or inet6 support')->plan(8);
+$t->try_run('no stream return')->plan(8);
 
 ###############################################################################