comparison proxy.t @ 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 93d900bac201
children e9064d691790
comparison
equal deleted inserted replaced
923:9239393e73c8 924:54680c434afa
8 8
9 use warnings; 9 use warnings;
10 use strict; 10 use strict;
11 11
12 use Test::More; 12 use Test::More;
13
14 use Socket;
13 15
14 BEGIN { use FindBin; chdir($FindBin::Bin); } 16 BEGIN { use FindBin; chdir($FindBin::Bin); }
15 17
16 use lib 'lib'; 18 use lib 'lib';
17 use Test::Nginx; 19 use Test::Nginx;
70 72
71 like(http_get('/var?b=127.0.0.1:8081/'), qr/SEE-THIS/, 'proxy with variables'); 73 like(http_get('/var?b=127.0.0.1:8081/'), qr/SEE-THIS/, 'proxy with variables');
72 like(http_get('/var?b=u/'), qr/SEE-THIS/, 'proxy with variables to upstream'); 74 like(http_get('/var?b=u/'), qr/SEE-THIS/, 'proxy with variables to upstream');
73 75
74 SKIP: { 76 SKIP: {
75 skip 'no ipv6', 1 unless $t->has_module('ipv6'); 77 skip 'no ipv6', 1 unless $t->has_module('ipv6')
78 and socket(my $s, &AF_INET6, &SOCK_STREAM, 0);
76 79
77 TODO: { 80 TODO: {
78 todo_skip 'heap-buffer-overflow', 1 81 todo_skip 'heap-buffer-overflow', 1
79 unless $ENV{TEST_NGINX_UNSAFE} or $t->has_version('1.11.0'); 82 unless $ENV{TEST_NGINX_UNSAFE} or $t->has_version('1.11.0');
80 83