# HG changeset patch # User Sergey Kandaurov # Date 1513702279 -10800 # Node ID b35037b3a9d03f08115c23a548709affa7506fb0 # Parent 5da72eaa893f621003ce3008248dcde390f1ea2d Tests: added "proxy_bind transparent" test with Linux capabilities. diff --git a/proxy_bind_transparent.t b/proxy_bind_transparent_capability.t copy from proxy_bind_transparent.t copy to proxy_bind_transparent_capability.t --- a/proxy_bind_transparent.t +++ b/proxy_bind_transparent_capability.t @@ -3,7 +3,8 @@ # (C) Sergey Kandaurov # (C) Nginx, Inc. -# Tests for http proxy_bind transparent. +# Tests for http proxy_bind transparent with Linux CAP_NET_RAW capability. +# Ensure that such configuration isn't broken under a non-priveleged user. ############################################################################### @@ -22,7 +23,7 @@ use Test::Nginx; select STDERR; $| = 1; select STDOUT; $| = 1; -plan(skip_all => 'win32') if $^O eq 'MSWin32'; +plan(skip_all => 'no linux capability') if $^O ne 'linux'; plan(skip_all => 'must be root') if $> != 0; plan(skip_all => '127.0.0.2 local address required') unless defined IO::Socket::INET->new( LocalAddr => '127.0.0.2' ); @@ -33,7 +34,6 @@ my $t = Test::Nginx->new()->has(qw/http %%TEST_GLOBALS%% daemon off; -user root wheel; events { } @@ -63,6 +63,8 @@ http { EOF +plan(skip_all => 'no capability support yet') unless $t->has_version('1.13.8'); + $t->run()->plan(1); ###############################################################################