changeset 924:54680c434afa

Tests: fixed proxy.t on platforms without IPv6 support.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 12 May 2016 18:03:51 +0300
parents 9239393e73c8
children 6bb1f2ccd386
files proxy.t
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/proxy.t
+++ b/proxy.t
@@ -11,6 +11,8 @@ use strict;
 
 use Test::More;
 
+use Socket;
+
 BEGIN { use FindBin; chdir($FindBin::Bin); }
 
 use lib 'lib';
@@ -72,7 +74,8 @@ like(http_get('/var?b=127.0.0.1:8081/'),
 like(http_get('/var?b=u/'), qr/SEE-THIS/, 'proxy with variables to upstream');
 
 SKIP: {
-skip 'no ipv6', 1 unless $t->has_module('ipv6');
+skip 'no ipv6', 1 unless $t->has_module('ipv6')
+	and socket(my $s, &AF_INET6, &SOCK_STREAM, 0);
 
 TODO: {
 todo_skip 'heap-buffer-overflow', 1