changeset 568:907e89fba9c3

Tests: removed TODO and try_run() checks for legacy versions.
author Sergey Kandaurov <pluknet@nginx.com>
date Sun, 03 May 2015 12:45:09 +0300
parents 22bade4c7e12
children adbb9b5108aa
files access_log.t auth_request.t autoindex_format.t charset_gzip_static.t debug_connection_syslog.t fastcgi_body2.t fastcgi_request_buffering.t fastcgi_request_buffering_chunked.t headers.t http_try_files.t image_filter_finalize.t limit_conn_complex.t mail_imap_ssl.t not_modified.t not_modified_proxy.t proxy_cache_lock.t proxy_cache_lock_age.t proxy_cache_lock_ssi.t proxy_cache_path.t proxy_cache_range.t proxy_cache_revalidate.t proxy_cache_variables.t proxy_cache_vary.t proxy_force_ranges.t proxy_if.t proxy_limit_rate.t proxy_next_upstream_tries.t proxy_request_buffering.t proxy_request_buffering_chunked.t proxy_request_buffering_ssl.t proxy_ssl_certificate.t proxy_ssl_name.t proxy_ssl_verify.t proxy_upstream_cookie.t proxy_variables.t proxy_xar.t rewrite_set.t spdy.t ssi.t ssl_engine_keys.t ssl_password_file.t sub_filter.t sub_filter_ssi.t syslog.t upstream_hash.t upstream_hash_memcached.t
diffstat 46 files changed, 55 insertions(+), 271 deletions(-) [+]
line wrap: on
line diff
--- a/access_log.t
+++ b/access_log.t
@@ -21,7 +21,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http rewrite/)
+my $t = Test::Nginx->new()->has(qw/http rewrite/)->plan(9)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -91,7 +91,7 @@ http {
 
 EOF
 
-$t->try_run('no access_log if')->plan(9);
+$t->run();
 
 ###############################################################################
 
@@ -184,15 +184,10 @@ is($log, $exp_complex, 'if with complex 
 
 # buffer created with false "if" is not reused among multiple access_log
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.5');
-
 $log = $t->read_file('/noreuse.log');
 is($log, "/filtered/noreuse1/good:200\n/filtered/noreuse2/good:200\n",
 	'log filtering with buffering');
 
-}
-
 
 # multiple logs in a same location
 
--- a/auth_request.t
+++ b/auth_request.t
@@ -168,13 +168,7 @@ unlike(http_get_auth('/proxy'), qr/INVIS
 
 like(http_post('/proxy'), qr/ 401 /, 'proxy auth post');
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.3');
-
 like(http_get_auth('/proxy-cache'), qr/ 404 /, 'proxy auth with cache');
-
-}
-
 like(http_get('/proxy-cache'), qr/ 404 /, 'proxy auth cached');
 
 # Consider the following scenario:
--- a/autoindex_format.t
+++ b/autoindex_format.t
@@ -25,7 +25,7 @@ select STDOUT; $| = 1;
 
 plan(skip_all => 'no symlinks on win32') if $^O eq 'MSWin32';
 
-my $t = Test::Nginx->new()->has(qw/http autoindex/)
+my $t = Test::Nginx->new()->has(qw/http autoindex/)->plan(37)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -77,7 +77,7 @@ mkdir($d . '/utf8');
 $t->write_file('utf8/test-utf8-' . ("\xd1\x84" x 3), '');
 $t->write_file('utf8/test-utf8-' . ("\xd1\x84" x 45), '');
 
-$t->try_run('no autoindex_format')->plan(37);
+$t->run();
 
 ###############################################################################
 
--- a/charset_gzip_static.t
+++ b/charset_gzip_static.t
@@ -121,29 +121,16 @@ like(http_get('/t1.html'), qr!text/html;
 like(http_gzip_request('/t1.html'), qr!text/html; charset=.*gzip!ms, 'gzip');
 
 like(http_get('/t2.html'), qr!text/html; charset=A.*Y{99}!ms, 'recode plain');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.1');
-
 like(http_gzip_request('/t2.html'), qr!text/html\x0d.*gzip!ms, 'recode gzip');
 http_gzip_like(http_gzip_request('/t2.html'), qr!X{99}!, 'recode content');
 
-}
-
 like(http_get('/t.html'), qr!text/html\x0d!, 'nocharset plain');
 like(http_gzip_request('/t.html'), qr!text/html\x0d.*gzip!ms, 'nocharset gzip');
 
 like(http_get('/p/t.html'), qr!text/html; charset=!, 'proxy plain');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.1');
-
 like(http_gzip_request('/p/t.html'), qr!text/html; charset=.*gzip!ms,
 	'proxy gzip');
 
-}
-
-
 like(http_get('/p.ab/t.html'), qr!text/html; charset=A!ms,
 	'proxy recode plain');
 like(http_gzip_request('/p.ab/t.html'), qr!text/html\x0d.*gzip!ms,
@@ -151,13 +138,7 @@ like(http_gzip_request('/p.ab/t.html'), 
 
 like(http_get('/p.aa/t.html'), qr!text/html; charset=A!ms,
 	'proxy nullrecode plain');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.1');
-
 like(http_gzip_request('/p.aa/t.html'), qr!text/html; charset=A.*gzip!ms,
 	'proxy nullrecode gzip');
 
-}
-
 ###############################################################################
--- a/debug_connection_syslog.t
+++ b/debug_connection_syslog.t
@@ -23,8 +23,6 @@ select STDOUT; $| = 1;
 
 my $t = Test::Nginx->new()->has(qw/http --with-debug ipv6 proxy/);
 
-plan(skip_all => 'no syslog') unless $t->has_version('1.7.1');
-
 $t->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
--- a/fastcgi_body2.t
+++ b/fastcgi_body2.t
@@ -80,9 +80,6 @@ EOF
 
 ###############################################################################
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.6');
-
 like(http_get_length('/', 'x' x 102400), qr/X-Length: 102400/,
 	'body length - in file');
 
@@ -93,8 +90,6 @@ http_get('/');
 like(http_get_length('/in_memory', 'x' x 102400), qr/X-Length: 102400/,
 	'body length - in memory');
 
-}
-
 ###############################################################################
 
 sub http_get_length {
--- a/fastcgi_request_buffering.t
+++ b/fastcgi_request_buffering.t
@@ -28,7 +28,7 @@ eval { require FCGI; };
 plan(skip_all => 'FCGI not installed') if $@;
 plan(skip_all => 'win32') if $^O eq 'MSWin32';
 
-my $t = Test::Nginx->new()->has(qw/http fastcgi rewrite/);
+my $t = Test::Nginx->new()->has(qw/http fastcgi rewrite/)->plan(15);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
@@ -76,9 +76,7 @@ http {
 EOF
 
 $t->run_daemon(\&fastcgi_daemon);
-$t->try_run('no fastcgi_request_buffering')->plan(15);
-
-$t->waitforsocket('127.0.0.1:8081');
+$t->run()->waitforsocket('127.0.0.1:8081');
 
 ###############################################################################
 
--- a/fastcgi_request_buffering_chunked.t
+++ b/fastcgi_request_buffering_chunked.t
@@ -29,7 +29,7 @@ eval { require FCGI; };
 plan(skip_all => 'FCGI not installed') if $@;
 plan(skip_all => 'win32') if $^O eq 'MSWin32';
 
-my $t = Test::Nginx->new()->has(qw/http fastcgi rewrite/);
+my $t = Test::Nginx->new()->has(qw/http fastcgi rewrite/)->plan(19);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
@@ -76,9 +76,7 @@ http {
 EOF
 
 $t->run_daemon(\&fastcgi_daemon);
-$t->try_run('no fastcgi_request_buffering')->plan(19);
-
-$t->waitforsocket('127.0.0.1:8081');
+$t->run()->waitforsocket('127.0.0.1:8081');
 
 ###############################################################################
 
--- a/headers.t
+++ b/headers.t
@@ -23,7 +23,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http/)
+my $t = Test::Nginx->new()->has(qw/http/)->plan(25)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -111,7 +111,7 @@ EOF
 $t->write_file('var_inner', '');
 $t->write_file('var_modified', '');
 
-$t->try_run('no add_header always or expires with variable')->plan(25);
+$t->run();
 
 ###############################################################################
 
--- a/http_try_files.t
+++ b/http_try_files.t
@@ -99,14 +99,7 @@ like(http_get('/nouri/notfound'), qr!X-U
 like(http_get('/short/long'), qr!404 Not!, 'short uri in try_files');
 
 like(http_get('/file-file/'), qr!SEE THIS!, 'file matches file');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.10');
-
 like(http_get('/file-dir/'), qr!404 Not!, 'file does not match dir');
-
-}
-
 like(http_get('/dir-dir/'), qr!301 Moved Permanently!, 'dir matches dir');
 like(http_get('/dir-file/'), qr!404 Not!, 'dir does not match file');
 
--- a/image_filter_finalize.t
+++ b/image_filter_finalize.t
@@ -140,15 +140,10 @@ EOF
 like(http_get('/t1'), qr/HTTP/, 'image filter and cache');
 like(http_get('/t2'), qr/HTTP/, 'image filter and store');
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.11');
-
 http_get('/slow');
 http_get('/t3');
 like(http_get('/time.log'), qr!/t3:.*, [1-9]\.!, 'upstream response time');
 
-}
-
 like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts');
 
 ###############################################################################
--- a/limit_conn_complex.t
+++ b/limit_conn_complex.t
@@ -26,7 +26,7 @@ select STDOUT; $| = 1;
 
 plan(skip_all => 'win32') if $^O eq 'MSWin32';
 
-my $t = Test::Nginx->new()->has(qw/http proxy limit_conn limit_req/);
+my $t = Test::Nginx->new()->has(qw/http proxy limit_conn limit_req/)->plan(4);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
@@ -64,7 +64,7 @@ http {
 
 EOF
 
-$t->try_run('no complex value')->plan(4);
+$t->run();
 
 ###############################################################################
 
--- a/mail_imap_ssl.t
+++ b/mail_imap_ssl.t
@@ -36,7 +36,7 @@ local $SIG{PIPE} = 'IGNORE';
 
 my $t = Test::Nginx->new()
 	->has(qw/mail mail_ssl imap http rewrite/)->has_daemon('openssl')
-	->run_daemon(\&Test::Nginx::IMAP::imap_test_daemon)
+	->run_daemon(\&Test::Nginx::IMAP::imap_test_daemon)->plan(12)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -137,7 +137,7 @@ foreach my $name ('1.example.com', '2.ex
 		or die "Can't create certificate for $name: $!\n";
 }
 
-$t->try_run('no mail ssl')->plan(12);
+$t->run();
 
 ###############################################################################
 
--- a/not_modified.t
+++ b/not_modified.t
@@ -79,14 +79,7 @@ like(http_get_inm('/t', '"foo"'), qr/ 20
 like(http_get_inm('/t', '"foo", "bar", ' . $etag . ' , "baz"'), qr/ 304 /,
 	'if-none-match with complex list');
 like(http_get_inm('/t', '*'), qr/ 304 /, 'if-none-match all');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.3');
-
 like(http_get_inm('/t', 'W/' . $etag), qr/ 304 /, 'if-none-match weak');
-
-}
-
 like(http_get_im('/t', $etag), qr/ 200 /, 'if-match');
 like(http_get_im('/t', '"foo"'), qr/ 412 /, 'if-match fail');
 like(http_get_im('/t', '"foo", "bar", ' . "\t" . $etag . ' , "baz"'),
--- a/not_modified_proxy.t
+++ b/not_modified_proxy.t
@@ -99,14 +99,8 @@ like(http_get_inm('/cache/t', $etag), qr
 
 like(http_get_inm('/etag', $etag), qr/ 304 /, 'if-none-match etag only');
 like(http_get_inm('/proxy/etag', $etag), qr/ 200 /, 'inm etag proxy ignored');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.3');
-
 like(http_get_inm('/cache/etag', $etag), qr/ 304 /, 'inm etag from cache');
 
-}
-
 ###############################################################################
 
 sub http_get_ims {
--- a/proxy_cache_lock.t
+++ b/proxy_cache_lock.t
@@ -23,7 +23,7 @@ select STDOUT; $| = 1;
 
 plan(skip_all => 'win32') if $^O eq 'MSWin32';
 
-my $t = Test::Nginx->new()->has(qw/http proxy cache/)
+my $t = Test::Nginx->new()->has(qw/http proxy cache/)->plan(18)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -69,7 +69,7 @@ EOF
 
 $t->run_daemon(\&http_fake_daemon);
 
-$t->run()->plan(18);
+$t->run();
 
 $t->waitforsocket('127.0.0.1:8081');
 
@@ -107,14 +107,8 @@ my $rest = http_end($sockets[2]);
 $rest .= http_end($sockets[3]);
 
 like($rest, qr/request (2.*request 3|3.*request 2)/s, 'lock timeout - rest');
-
-TODO: {
-local $TODO = 'behavior change' unless $t->has_version('1.7.8');
-
 like(http_get('/timeout'), qr/request 1/, 'lock timeout - first only cached');
 
-}
-
 # no lock
 
 for my $i (1 .. 3) {
--- a/proxy_cache_lock_age.t
+++ b/proxy_cache_lock_age.t
@@ -26,7 +26,7 @@ select STDOUT; $| = 1;
 
 plan(skip_all => 'win32') if $^O eq 'MSWin32';
 
-my $t = Test::Nginx->new()->has(qw/http proxy cache/)
+my $t = Test::Nginx->new()->has(qw/http proxy cache/)->plan(2)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -59,10 +59,7 @@ http {
 EOF
 
 $t->run_daemon(\&http_daemon, 8081);
-
-$t->try_run('no proxy_cache_lock_age')->plan(2);
-
-$t->waitforsocket('127.0.0.1:8081');
+$t->run()->waitforsocket('127.0.0.1:8081');
 
 ###############################################################################
 
--- a/proxy_cache_lock_ssi.t
+++ b/proxy_cache_lock_ssi.t
@@ -99,12 +99,6 @@ EOF
 my $s = http_get('/locked', start => 1);
 like(http_get('/ssi.html'), qr/end/, 'cache lock ssi');
 my ($start) = http_end($s) =~ /X-Msec: (\d+)/;
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.8');
-
 cmp_ok(time() - $start, '<=', 3, 'parallel execution after lock timeout');
 
-}
-
 ###############################################################################
--- a/proxy_cache_path.t
+++ b/proxy_cache_path.t
@@ -24,7 +24,7 @@ select STDOUT; $| = 1;
 
 plan(skip_all => 'win32') if $^O eq 'MSWin32';
 
-my $t = Test::Nginx->new()->has(qw/http proxy cache/)
+my $t = Test::Nginx->new()->has(qw/http proxy cache/)->plan(7)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -72,7 +72,7 @@ EOF
 
 $t->write_file('t', 'SEE-THIS');
 
-$t->try_run('no use_temp_path')->plan(7);
+$t->run();
 
 ###############################################################################
 
--- a/proxy_cache_range.t
+++ b/proxy_cache_range.t
@@ -87,17 +87,12 @@ like(http_get_range('/t.html?1', 'Range:
 like(http_get_range('/t.html?1', 'Range: bytes=0-2,4-'), qr/^SEE.*^THIS/ms,
 	'cached multipart range');
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.8');
-
 like(http_get_range('/min_uses/t.html?3', 'Range: bytes=4-'),
 	qr/^THIS/m, 'range below min_uses');
 
 like(http_get_range('/min_uses/t.html?4', 'Range: bytes=0-2,4-'),
 	qr/^SEE.*^THIS/ms, 'multipart range below min_uses');
 
-}
-
 like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts');
 
 ###############################################################################
--- a/proxy_cache_revalidate.t
+++ b/proxy_cache_revalidate.t
@@ -23,7 +23,7 @@ select STDOUT; $| = 1;
 
 plan(skip_all => 'win32') if $^O eq 'MSWin32';
 
-my $t = Test::Nginx->new()->has(qw/http proxy cache rewrite/)
+my $t = Test::Nginx->new()->has(qw/http proxy cache rewrite/)->plan(23)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -81,7 +81,7 @@ my $d = $t->testdir();
 $t->write_file('t2', 'SEE-THIS');
 $t->write_file('t3', 'SEE-THIS');
 
-$t->run()->plan(23);
+$t->run();
 
 ###############################################################################
 
@@ -131,14 +131,8 @@ like(http_get('/t2'), qr/X-Cache-Status:
 # 1st document isn't modified
 # 2nd document is recreated
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.7');
-
 like(http_get('/etag/t'), qr/X-Cache-Status: REVALIDATED.*SEE/ms,
 	'etag revalidated');
-
-}
-
 like(http_get('/etag/t'), qr/X-Cache-Status: HIT.*SEE/ms,
 	'etag cached again');
 like(http_get('/etag/t2'), qr/X-Cache-Status: EXPIRED.*NEW/ms,
--- a/proxy_cache_variables.t
+++ b/proxy_cache_variables.t
@@ -24,7 +24,7 @@ select STDOUT; $| = 1;
 
 plan(skip_all => 'win32') if $^O eq 'MSWin32';
 
-my $t = Test::Nginx->new()->has(qw/http proxy cache/)
+my $t = Test::Nginx->new()->has(qw/http proxy cache/)->plan(9)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -70,7 +70,7 @@ EOF
 
 $t->write_file('index.html', 'SEE-THIS');
 
-$t->try_run('no proxy_cache with variables')->plan(9);
+$t->run();
 
 ###############################################################################
 
--- a/proxy_cache_vary.t
+++ b/proxy_cache_vary.t
@@ -23,7 +23,7 @@ select STDOUT; $| = 1;
 
 plan(skip_all => 'win32') if $^O eq 'MSWin32';
 
-my $t = Test::Nginx->new()->has(qw/http proxy cache gzip rewrite/)
+my $t = Test::Nginx->new()->has(qw/http proxy cache gzip rewrite/)->plan(42)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -103,12 +103,10 @@ EOF
 $t->write_file('asterisk', 'SEE-THIS');
 $t->write_file('complex', 'SEE-THIS');
 
-$t->try_run('no proxy_ignore_headers Vary')->plan(42);
+$t->run();
 
 ###############################################################################
 
-local $TODO = 'not yet' unless $t->has_version('1.7.7');
-
 like(get('/', 'gzip'), qr/MISS/ms, 'first request');
 like(get('/', 'gzip'), qr/HIT/ms, 'vary match cached');
 like(get('/', 'deflate'), qr/MISS/ms, 'vary mismatch');
--- a/proxy_force_ranges.t
+++ b/proxy_force_ranges.t
@@ -25,7 +25,7 @@ select STDOUT; $| = 1;
 
 plan(skip_all => 'win32') if $^O eq 'MSWin32';
 
-my $t = Test::Nginx->new()->has(qw/http proxy cache/)
+my $t = Test::Nginx->new()->has(qw/http proxy cache/)->plan(5)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -71,7 +71,7 @@ http {
 EOF
 
 $t->write_file('t.html', 'SEE-THIS');
-$t->try_run('no proxy_force_ranges')->plan(5);
+$t->run();
 
 ###############################################################################
 
--- a/proxy_if.t
+++ b/proxy_if.t
@@ -183,9 +183,6 @@ like(http_get('/'), qr!uri:/$!, 'proxy r
 like(http_get('/proxy-pass-uri'), qr!uri:/replacement$!,
 	'proxy_pass uri changed');
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.9');
-
 # due to missing information about an original location where
 # proxy_pass was specified, this used to pass request with
 # original unmodified uri
@@ -193,8 +190,6 @@ local $TODO = 'not yet' unless $t->has_v
 like(http_get('/proxy-pass-uri?if=1'), qr!uri:/replacement$!,
 	'proxy_pass uri changed in if');
 
-}
-
 like(http_get('/proxy-pass-uri/inner'), qr!404 Not Found!,
 	'proxy_pass uri changed inner');
 like(http_get('/proxy-pass-uri/inner?if=1'), qr!404 Not Found!,
@@ -205,17 +200,12 @@ like(http_get('/proxy-pass-uri/inner?if=
 like(http_get('/proxy-pass-uri-lmt'), qr!uri:/replacement$!,
 	'proxy_pass uri and limit_except');
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.9');
-
 # special handling of limit_except resulted in wrong handling
 # of requests in nested locations
 
 like(http_get('/proxy-pass-uri-lmt/inner'), qr!404 Not Found!,
 	'proxy_pass uri and limit_except, inner');
 
-}
-
 like(http_get('/proxy-pass-uri-lmt-different'),
 	qr!uri:/proxy-pass-uri-lmt-different!,
 	'proxy_pass and limit_except with different proxy_pass');
@@ -232,17 +222,11 @@ like(http_get('/proxy-inside-if-crash'),
 
 like(http_get('/variables'), qr!uri:/outer!,
 	'proxy_pass variables');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.9');
-
 like(http_get('/variables?if=1'), qr!uri:/variables!,
 	'proxy_pass variables if');
 like(http_get('/variables/inner'), qr!uri:/variables/inner!,
 	'proxy_pass variables nested');
 
-}
-
 # ssl context shouldn't be inherited into nested
 # locations with different proxy_pass, but should
 # be correctly inherited into if's
@@ -251,13 +235,7 @@ like(http_get('/ssl'), qr!uri:/outer!,
 	'proxy_pass ssl');
 like(http_get('/ssl?if=1'), qr!uri:/outer!,
 	'proxy_pass ssl inside if');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.9');
-
 like(http_get('/ssl/inner'), qr!uri:/ssl/inner!,
 	'proxy_pass nossl inside ssl');
 
-}
-
 ###############################################################################
--- a/proxy_limit_rate.t
+++ b/proxy_limit_rate.t
@@ -22,7 +22,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http proxy/);
+my $t = Test::Nginx->new()->has(qw/http proxy/)->plan(2);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
@@ -54,7 +54,7 @@ http {
 EOF
 
 $t->write_file('data', 'X' x 40000);
-$t->try_run('no proxy_limit_rate')->plan(2);
+$t->run();
 
 ###############################################################################
 
--- a/proxy_next_upstream_tries.t
+++ b/proxy_next_upstream_tries.t
@@ -23,7 +23,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http proxy rewrite/);
+my $t = Test::Nginx->new()->has(qw/http proxy rewrite/)->plan(8);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
@@ -113,7 +113,7 @@ EOF
 
 $t->run_daemon(\&http_daemon, 8081);
 $t->run_daemon(\&dns_daemon, 8083, $t);
-$t->try_run('no proxy_next_upstream_tries')->plan(8);
+$t->run();
 
 $t->waitforsocket('127.0.0.1:8081');
 $t->waitforfile($t->testdir . '/8083');
@@ -122,28 +122,14 @@ EOF
 
 like(http_get('/tries'), qr/x404, 404x/, 'tries');
 like(http_get('/tries/backup'), qr/x404, 404x/, 'tries backup');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.7');
-
 like(http_get('/tries/resolver'), qr/x404, 404x/, 'tries resolved');
-
-}
-
 like(http_get('/tries/zero'), qr/x404, 404, 404x/, 'tries zero');
 
 # two tries fit into 1.9s
 
 like(http_get('/timeout'), qr/x404, 404x/, 'timeout');
 like(http_get('/timeout/backup'), qr/x404, 404x/, 'timeout backup');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.7');
-
 like(http_get('/timeout/resolver'), qr/x404, 404x/, 'timeout resolved');
-
-}
-
 like(http_get('/timeout/zero'), qr/x404, 404, 404x/, 'timeout zero');
 
 ###############################################################################
--- a/proxy_request_buffering.t
+++ b/proxy_request_buffering.t
@@ -24,7 +24,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http proxy rewrite/);
+my $t = Test::Nginx->new()->has(qw/http proxy rewrite/)->plan(18);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
@@ -88,7 +88,7 @@ http {
 
 EOF
 
-$t->try_run('no proxy_request_buffering')->plan(18);
+$t->run();
 
 ###############################################################################
 
--- a/proxy_request_buffering_chunked.t
+++ b/proxy_request_buffering_chunked.t
@@ -24,7 +24,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http proxy rewrite/);
+my $t = Test::Nginx->new()->has(qw/http proxy rewrite/)->plan(22);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
@@ -89,7 +89,7 @@ http {
 
 EOF
 
-$t->try_run('no proxy_request_buffering')->plan(22);
+$t->run();
 
 ###############################################################################
 
@@ -150,13 +150,7 @@ ok($s, 'preread');
 SKIP: {
 skip 'preread failed', 3 unless $s;
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.12');
-
 is($s->{preread}, '5' . CRLF . '01234' . CRLF, 'preread - preread');
-
-}
-
 is($s->{upload}('56789', last => 1),
 	'5' . CRLF . '56789' . CRLF . '0' . CRLF . CRLF, 'preread - body');
 
@@ -170,13 +164,7 @@ ok($s, 'chunks');
 SKIP: {
 skip 'chunks failed', 3 unless $s;
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.12');
-
 is($s->{preread}, '9' . CRLF . '01234many' . CRLF, 'chunks - preread');
-
-}
-
 is($s->{upload}('56789', many => 1, last => 1),
 	'9' . CRLF . '56789many' . CRLF . '0' . CRLF . CRLF, 'chunks - body');
 
--- a/proxy_request_buffering_ssl.t
+++ b/proxy_request_buffering_ssl.t
@@ -25,7 +25,7 @@ select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
 my $t = Test::Nginx->new()->has(qw/http http_ssl proxy rewrite/)
-	->has_daemon('openssl');
+	->has_daemon('openssl')->plan(18);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
@@ -113,7 +113,7 @@ foreach my $name ('localhost') {
 		or die "Can't create certificate for $name: $!\n";
 }
 
-$t->try_run('no proxy_request_buffering')->plan(18);
+$t->run();
 
 ###############################################################################
 
@@ -153,14 +153,9 @@ ok($s, 'no preread');
 SKIP: {
 skip 'no preread failed', 3 unless $s;
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.12');
-
 is($s->{upload}('01234'), '01234', 'no preread - body part');
 is($s->{upload}('56789'), '56789', 'no preread - body part 2');
 
-}
-
 like($s->{http_end}(), qr/200 OK/, 'no preread - response');
 
 }
@@ -172,15 +167,9 @@ SKIP: {
 skip 'preread failed', 3 unless $s;
 
 is($s->{preread}, '01234', 'preread - preread');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.12');
-
 is($s->{upload}('56789'), '56789', 'preread - body part');
 is($s->{upload}('abcde'), 'abcde', 'preread - body part 2');
 
-}
-
 like($s->{http_end}(), qr/200 OK/, 'preread - response');
 
 }
--- a/proxy_ssl_certificate.t
+++ b/proxy_ssl_certificate.t
@@ -24,11 +24,9 @@ select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
 my $t = Test::Nginx->new()->has(qw/http http_ssl proxy/)
-	->has_daemon('openssl');
+	->has_daemon('openssl')->plan(5);
 
-plan(skip_all => 'no proxy_ssl_password_file') unless $t->has_version('1.7.8');
-
-$t->plan(5)->write_file_expand('nginx.conf', <<'EOF');
+$t->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
 
--- a/proxy_ssl_name.t
+++ b/proxy_ssl_name.t
@@ -24,7 +24,7 @@ select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
 my $t = Test::Nginx->new()->has(qw/http http_ssl sni proxy/)
-	->has_daemon('openssl')
+	->has_daemon('openssl')->plan(8)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -134,7 +134,7 @@ foreach my $name ('localhost') {
 
 $t->write_file('index.html', '');
 
-$t->try_run('no proxy_ssl_name')->plan(8);
+$t->run();
 
 ###############################################################################
 
--- a/proxy_ssl_verify.t
+++ b/proxy_ssl_verify.t
@@ -23,7 +23,7 @@ select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
 my $t = Test::Nginx->new()->has(qw/http http_ssl proxy/)
-	->has_daemon('openssl')
+	->has_daemon('openssl')->plan(6)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -144,7 +144,7 @@ foreach my $name ('1.example.com', '2.ex
 
 $t->write_file('index.html', '');
 
-$t->try_run('no proxy_ssl_verify')->plan(6);
+$t->run();
 
 ###############################################################################
 
--- a/proxy_upstream_cookie.t
+++ b/proxy_upstream_cookie.t
@@ -21,7 +21,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http proxy rewrite/);
+my $t = Test::Nginx->new()->has(qw/http proxy rewrite/)->plan(19);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
@@ -70,7 +70,7 @@ http {
 
 EOF
 
-$t->try_run('no upstream_cookie_<name>')->plan(19);
+$t->run();
 
 ###############################################################################
 
--- a/proxy_variables.t
+++ b/proxy_variables.t
@@ -22,7 +22,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http proxy/)
+my $t = Test::Nginx->new()->has(qw/http proxy/)->plan(8)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -63,9 +63,7 @@ http {
 EOF
 
 $t->run_daemon(\&http_daemon, 8081);
-$t->try_run('no upstream_header_time')->plan(8);
-
-$t->waitforsocket('127.0.0.1:8081');
+$t->run()->waitforsocket('127.0.0.1:8081');
 
 ###############################################################################
 
--- a/proxy_xar.t
+++ b/proxy_xar.t
@@ -103,12 +103,7 @@ unlike(http_get('/proxy?xar=/foo/.%2e'),
 like(http_get('/proxy?xar=/foo%20bar'), qr/uri: \/foo bar/,
 	'X-Accel-Redirect unescaped');
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.8');
-
 like(http_get('/proxy?xar=@named'),
 	qr!200 OK.*named xar: \@named uri: /proxy!s, 'in named location');
 
-}
-
 ###############################################################################
--- a/rewrite_set.t
+++ b/rewrite_set.t
@@ -75,21 +75,11 @@ EOF
 
 # prefixed variables
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.5');
-
-SKIP: {
-skip 'leaves coredump', 2 unless $t->has_version('1.7.5')
-	or $ENV{TEST_NGINX_UNSAFE};
-
 like(http_get_extra('/t1.html', 'Foo: http_foo'), qr/Xset_fooX/,
 	'set in this context');
 like(http_get_extra('/t2.html', 'Bar: http_bar'), qr/Xhttp_barX/,
 	'set in other context');
 
-}
-}
-
 like(http_get_extra('/t3.html', 'Baz: http_baz'), qr/Xhttp_bazX/, 'not set');
 
 like(http_get('/t4.html'), qr/XbarX/, 'set get in return');
--- a/spdy.t
+++ b/spdy.t
@@ -220,9 +220,6 @@ is($frame->{headers}->{':status'}, 206, 
 is($frame->{length}, 10, 'DATA length range');
 is($frame->{data}, '002XXXX000', 'DATA payload range');
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.4');
-
 # request header with multiple values
 
 $sess = new_session();
@@ -245,8 +242,6 @@ ok(grep ({ $_->{type} eq "SYN_REPLY" } @
 is($frame->{headers}->{'x-cookie'}, 'val1; val2',
 	'multiple request header values - proxied');
 
-}
-
 # response header with multiple values
 
 $sess = new_session();
@@ -259,9 +254,6 @@ is($frame->{headers}->{'set-cookie'}, "v
 
 # response header with multiple values - no empty values inside
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.8');
-
 $sess = new_session();
 $sid1 = spdy_stream($sess, { path => '/header/inside' });
 $frames = spdy_read($sess, all => [{ sid => $sid1, fin => 1 }]);
@@ -281,8 +273,6 @@ is($frame->{headers}->{'x-foo'}, "val1\0
 ($frame) = grep { $_->{type} eq "SYN_REPLY" } @$frames;
 is($frame->{headers}->{'x-foo'}, "val1\0val2", 'no empty header value last');
 
-}
-
 # $spdy
 
 $sess = new_session();
@@ -330,16 +320,10 @@ ok(!grep ({ $_->{type} eq "DATA" } @$fra
 # ensure that HEAD-like requests, i.e., without response body, do not lead to
 # client connection close due to cache filling up with upstream response body
 
-TODO: {
-local $TODO = 'premature client connection close'
-	unless $t->has_version('1.7.3');
-
 $sid2 = spdy_stream($sess, { path => '/' });
 $frames = spdy_read($sess, all => [{ sid => $sid2, fin => 1 }]);
 ok(grep ({ $_->{type} eq "SYN_REPLY" } @$frames), 'proxy cache headers only');
 
-}
-
 # HEAD on empty cache with proxy_buffering off
 
 $sess = new_session();
--- a/ssi.t
+++ b/ssi.t
@@ -159,14 +159,9 @@ like(http_get('/test-empty2.html'), qr/H
 like(http_get('/test-empty3.html'), qr/HTTP/, 'empty with proxy');
 like(http_get('/test-empty3.html'), qr/HTTP/, 'empty with proxy cached');
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.8');
-
 like(http_get('/test-empty-postpone.html'), qr/HTTP.*XX/ms,
 	'empty with postpone_output 0');
 
-}
-
 # handling of escaped URIs
 
 like(http_get('/unescape1.html'), qr/^XXtestXX$/m, 'escaped in path');
@@ -192,11 +187,6 @@ like(http_get('/var_format.html?custom=1
 like(http_get('/var_format.html'),
 	qr/x\w+, \d\d-\w{3}-\d{4} \d\d:\d\d:\d\d \w+x/, 'default ssi');
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.8');
-
 like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts');
 
-}
-
 ###############################################################################
--- a/ssl_engine_keys.t
+++ b/ssl_engine_keys.t
@@ -118,7 +118,7 @@ foreach my $name ('localhost') {
 		or die "Can't create certificate for $name: $!\n";
 }
 
-$t->try_run('no ssl_certificate_key engine');
+$t->run();
 
 $t->write_file('index.html', '');
 
--- a/ssl_password_file.t
+++ b/ssl_password_file.t
@@ -35,8 +35,6 @@ plan(skip_all => 'win32') if $^O eq 'MSW
 my $t = Test::Nginx->new()->has(qw/http http_ssl rewrite/)
 	->has_daemon('openssl');
 
-plan(skip_all => 'no ssl_password_file') unless $t->has_version('1.7.2');
-
 $t->plan(3)->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
--- a/sub_filter.t
+++ b/sub_filter.t
@@ -106,13 +106,6 @@ like(http_get('/complex3?b=aab'), qr/_re
 like(http_get('/complex3?b=aaab'), qr/a_replaced/, 'complex3 aab in aaab');
 like(http_get('/complex3?b=aaaab'), qr/aa_replaced/, 'complex3 aab in aaaab');
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.5');
-
-SKIP: {
-skip 'leaves coredump', 8 unless $t->has_version('1.7.5')
-	or $ENV{TEST_NGINX_UNSAFE};
-
 like(http_get('/single?b=A'), qr/B/, 'single only');
 like(http_get('/single?b=AA'), qr/BA/, 'single begin');
 like(http_get('/single?b=CAAC'), qr/CBAC/, 'single middle');
@@ -123,8 +116,4 @@ like(http_get('/single/many?b=AA'), qr/B
 like(http_get('/single/many?b=CAAC'), qr/CBBC/, 'single many middle');
 like(http_get('/single/many?b=CA'), qr/CB/, 'single many end');
 
-}
-
-}
-
 ###############################################################################
--- a/sub_filter_ssi.t
+++ b/sub_filter_ssi.t
@@ -79,12 +79,7 @@ EOF
 
 ###############################################################################
 
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.7.1');
-
 like(http_get('/index.html'), qr/not truncated/, 'subrequest partial match');
 like(http_get('/xslt.html'), qr/not.*truncated/ms, 'partial match and xslt');
 
-}
-
 ###############################################################################
--- a/syslog.t
+++ b/syslog.t
@@ -26,8 +26,6 @@ plan(skip_all => 'win32') if $^O eq 'MSW
 
 my $t = Test::Nginx->new()->has(qw/http limit_req/);
 
-plan(skip_all => 'no syslog if') unless $t->has_version('1.7.5');
-
 $t->plan(58)->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
--- a/upstream_hash.t
+++ b/upstream_hash.t
@@ -22,7 +22,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has(qw/http proxy rewrite upstream_hash/);
+my $t = Test::Nginx->new()->has(qw/http proxy rewrite upstream_hash/)->plan(11);
 
 $t->write_file_expand('nginx.conf', <<'EOF');
 
@@ -150,7 +150,7 @@ http {
 
 EOF
 
-$t->try_run('no upstream hash')->plan(11);
+$t->run();
 
 ###############################################################################
 
--- a/upstream_hash_memcached.t
+++ b/upstream_hash_memcached.t
@@ -29,7 +29,9 @@ eval { require Cache::Memcached::Fast; }
 plan(skip_all => 'Cache::Memcached::Fast not installed') if $@;
 
 my $t = Test::Nginx->new()->has(qw/http rewrite memcached upstream_hash/)
-	->has_daemon('memcached')->write_file_expand('nginx.conf', <<'EOF');
+	->has_daemon('memcached')->plan(4);
+
+$t->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
 
@@ -107,7 +109,7 @@ if ($memhelp =~ /-U/) {
 $t->run_daemon('memcached', '-l', '127.0.0.1', '-p', '8081', @memopts);
 $t->run_daemon('memcached', '-l', '127.0.0.1', '-p', '8082', @memopts);
 $t->run_daemon('memcached', '-l', '127.0.0.1', '-p', '8083', @memopts);
-$t->try_run('no upstream hash')->plan(4);
+$t->run();
 
 $t->waitforsocket('127.0.0.1:8081') or die "Can't start memcached";
 $t->waitforsocket('127.0.0.1:8082') or die "Can't start memcached";