changeset 1064:6508aa1cf9cb

Tests: skip geoip tests on hosts without GeoIP IPv6 support.
author Andrey Zelenkov <zelenkov@nginx.com>
date Wed, 19 Oct 2016 20:55:19 +0300
parents d62747c321a6
children 2d4343a47c6d
files geoip.t stream_geoip.t
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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/)->plan(20)
+my $t = Test::Nginx->new()->has(qw/http http_geoip ipv6/)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -144,7 +144,7 @@ for my $i (0 .. 31) {
 
 $t->write_file('org.dat', $data);
 $t->write_file('index.html', '');
-$t->run();
+$t->try_run('no inet6 support')->plan(20);
 
 ###############################################################################
 
--- a/stream_geoip.t
+++ b/stream_geoip.t
@@ -26,7 +26,7 @@ select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
 my $t = Test::Nginx->new()->has(qw/stream stream_geoip stream_return ipv6/)
-	->has('stream_realip')->plan(20);
+	->has('stream_realip');
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
@@ -142,7 +142,7 @@ for my $i (0 .. 31) {
 $data .= pack_node(32);
 
 $t->write_file('org.dat', $data);
-$t->run();
+$t->try_run('no inet6 support')->plan(20);
 
 ###############################################################################