comparison proxy_bind_transparent.t @ 917:6af0421615ea

Tests: require superuser for proxy_bind transparent tests.
author Sergey Kandaurov <pluknet@nginx.com>
date Tue, 26 Apr 2016 20:18:49 +0300
parents 1ffb16747167
children e9064d691790
comparison
equal deleted inserted replaced
916:f2b2633a3fc1 917:6af0421615ea
21 21
22 select STDERR; $| = 1; 22 select STDERR; $| = 1;
23 select STDOUT; $| = 1; 23 select STDOUT; $| = 1;
24 24
25 plan(skip_all => 'win32') if $^O eq 'MSWin32'; 25 plan(skip_all => 'win32') if $^O eq 'MSWin32';
26 plan(skip_all => 'must be root') if $> != 0;
26 plan(skip_all => '127.0.0.2 local address required') 27 plan(skip_all => '127.0.0.2 local address required')
27 unless defined IO::Socket::INET->new( LocalAddr => '127.0.0.2' ); 28 unless defined IO::Socket::INET->new( LocalAddr => '127.0.0.2' );
28 29
29 my $t = Test::Nginx->new()->has(qw/http proxy/) 30 my $t = Test::Nginx->new()->has(qw/http proxy/)
30 ->write_file_expand('nginx.conf', <<'EOF'); 31 ->write_file_expand('nginx.conf', <<'EOF');
31 32
32 %%TEST_GLOBALS%% 33 %%TEST_GLOBALS%%
33 34
34 daemon off; 35 daemon off;
36 user root wheel;
35 37
36 events { 38 events {
37 } 39 }
38 40
39 http { 41 http {