Tests: removed TODO and try_run() checks for legacy versions.
diff --git a/auth_delay.t b/auth_delay.t
index edc1d32..90034eb 100644
--- a/auth_delay.t
+++ b/auth_delay.t
@@ -55,7 +55,7 @@
$t->write_file('index.html', '');
$t->write_file('htpasswd', 'user:' . '{PLAIN}good' . "\n");
-$t->try_run('no auth_delay')->plan(4);
+$t->run()->plan(4);
###############################################################################
diff --git a/binary_upgrade.t b/binary_upgrade.t
index a3c57d5..d4e7c1d 100644
--- a/binary_upgrade.t
+++ b/binary_upgrade.t
@@ -89,11 +89,6 @@
select undef, undef, undef, 0.2
}
-TODO: {
-$TODO = 'not yet' unless $t->has_version('1.19.1');
-
ok(-e "$d/unix.sock", 'unix socket exists on new master termination');
-}
-
###############################################################################
diff --git a/body.t b/body.t
index 0e3561d..dc487cc 100644
--- a/body.t
+++ b/body.t
@@ -170,9 +170,6 @@
# discarded request body in redirect via error_page
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.17.7');
-
unlike(
http(
'POST /redirect HTTP/1.1' . CRLF
@@ -184,8 +181,6 @@
qr/400 Bad Request/ms, 'redirect - discard request body'
);
-}
-
###############################################################################
sub read_body_file {
diff --git a/body_chunked.t b/body_chunked.t
index 549d4cc..31702e3 100644
--- a/body_chunked.t
+++ b/body_chunked.t
@@ -136,9 +136,6 @@
# invalid chunks
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.17.4');
-
like(
http(
'GET / HTTP/1.1' . CRLF
@@ -165,8 +162,6 @@
qr/400 Bad/, 'runaway chunk discard'
);
-}
-
# proxy_next_upstream
like(http_get_body('/next', '0123456789'),
@@ -174,17 +169,12 @@
# invalid Transfer-Encoding
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.17.9');
-
like(http_transfer_encoding('identity'), qr/501 Not Implemented/,
'transfer encoding identity');
like(http_transfer_encoding("chunked\nTransfer-Encoding: chunked"),
qr/400 Bad/, 'transfer encoding repeat');
-}
-
like(http_transfer_encoding('chunked, identity'), qr/501 Not Implemented/,
'transfer encoding list');
diff --git a/dav.t b/dav.t
index 7da52aa..751ea2a 100644
--- a/dav.t
+++ b/dav.t
@@ -137,15 +137,10 @@
SKIP: {
skip 'perl too old', 1 if !$^V or $^V lt v5.12.0;
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.17.7');
-
like($r, qr!(?(?{ $r =~ /Location/ })Location: /test/)!, 'mkcol location');
}
-}
-
$r = http(<<EOF);
COPY /test/ HTTP/1.1
Host: localhost
@@ -225,7 +220,6 @@
like($r, qr/415 Unsupported/, 'copy body');
-
$r = http(<<EOF . '0123456789');
DELETE /file HTTP/1.1
Host: localhost
@@ -236,9 +230,6 @@
like($r, qr/415 Unsupported/, 'delete body');
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.17.7');
-
$r = http(<<EOF);
MKCOL /test/ HTTP/1.1
Host: localhost
@@ -282,6 +273,4 @@
like($r, qr/415 Unsupported/, 'delete body chunked');
-}
-
###############################################################################
diff --git a/debug_connection_unix.t b/debug_connection_unix.t
index 72fce14..71082e0 100644
--- a/debug_connection_unix.t
+++ b/debug_connection_unix.t
@@ -52,7 +52,7 @@
EOF
-$t->try_run('no unix support')->plan(5);
+$t->run()->plan(5);
###############################################################################
diff --git a/fastcgi_extra_data.t b/fastcgi_extra_data.t
index 35524f7..2f35380 100644
--- a/fastcgi_extra_data.t
+++ b/fastcgi_extra_data.t
@@ -81,32 +81,22 @@
###############################################################################
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.1');
-
like(http_get('/'), qr/SEE-THIS(?!-BUT-NOT-THIS)/, 'response with extra data');
like(http_get('/short'), qr/SEE-THIS(?!.*:after)/s, 'too short response');
like(http_get('/empty'), qr/200 OK(?!.*:after)/s, 'empty too short response');
-}
-
like(http_head('/'), qr/200 OK(?!.*SEE-THIS)/s, 'no data in HEAD');
like(http_head('/short'), qr/200 OK(?!.*SEE-THIS)/s, 'too short to HEAD');
like(http_head('/empty'), qr/200 OK/, 'empty response to HEAD');
# unbuffered responses
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.1');
-
like(http_get('/unbuf/'), qr/SEE-THIS(?!-BUT-NOT-THIS)/,
'unbuffered with extra data');
like(http_get('/unbuf/short'), qr/SEE-THIS(?!.*:after)/s,
'unbuffered too short response');
like(http_get('/unbuf/empty'), qr/200 OK(?!.*:after)/s,
- 'unbuffered empty too short responsde');
-
-}
+ 'unbuffered empty too short response');
like(http_head('/unbuf/'), qr/200 OK(?!.*SEE-THIS)/s,
'unbuffered no data in HEAD');
@@ -124,31 +114,17 @@
like(http_get('/head/empty'), qr/200 OK/, 'head no body cached');
like(http_get('/head/matching'), qr/SEE-THIS/, 'head matching cached');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.1');
-
like(http_get('/head/extra'), qr/SEE-THIS(?!-BUT-NOT-THIS)/s,
'head extra cached');
like(http_get('/head/short'), qr/SEE-THIS(?!.*:after)/s,
'head too short cached');
-}
-
# "zero size buf" alerts (ticket #2018)
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.2');
-
like(http_get('/zero'), qr/200 OK(?!.*NOT-THIS)/s, 'zero size');
like(http_get('/unbuf/zero'), qr/200 OK(?!.*NOT-THIS)/s,
'unbuffered zero size');
-}
-
-$t->todo_alerts() unless $t->has_version('1.19.2')
- or !$t->has_version('1.19.1');
-
###############################################################################
sub fastcgi_daemon {
diff --git a/geo_unix.t b/geo_unix.t
index 0e5a2ed..fcdace4 100644
--- a/geo_unix.t
+++ b/geo_unix.t
@@ -102,11 +102,6 @@
$t->stop();
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.1');
-
is(-e $t->testdir() . '/unix.sock', undef, 'unix socket removed');
-}
-
###############################################################################
diff --git a/grpc.t b/grpc.t
index 813a7b7..68c6091 100644
--- a/grpc.t
+++ b/grpc.t
@@ -47,8 +47,6 @@
listen 127.0.0.1:8080 http2;
server_name localhost;
- http2_max_field_size 128k;
- http2_max_header_size 128k;
http2_body_preread_size 128k;
large_client_header_buffers 4 32k;
@@ -92,11 +90,7 @@
EOF
-# suppress deprecation warning
-
-open OLDERR, ">&", \*STDERR; close STDERR;
$t->run();
-open STDERR, ">&", \*OLDERR;
###############################################################################
@@ -284,9 +278,6 @@
# malformed response body length not equal to content-length
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.1');
-
$f->{http_start}('/SayHello');
$f->{data}('Hello');
$frames = $f->{http_err2}(cl => 42);
@@ -299,8 +290,6 @@
($frame) = grep { $_->{type} eq "RST_STREAM" } @$frames;
ok($frame, 'response body more than content-length');
-}
-
# continuation from backend, expect parts assembled
$f->{http_start}('/SayHello');
@@ -481,10 +470,6 @@
# DATA padding with Content-Length
-TODO: {
-local $TODO = 'not yet'
- if $t->has_version('1.19.1') and !$t->has_version('1.19.9');
-
$f->{http_start}('/SayPadding');
$f->{data}('Hello');
$frames = $f->{http_end}(body_padding => 42, cl => length('Hello world'));
@@ -493,8 +478,6 @@
is($frame->{length}, 11, 'DATA padding cl - length');
is($frame->{flags}, 0, 'DATA padding cl - flags');
-}
-
# :authority inheritance
$frames = $f->{http_start}('/SayHello?if=1');
@@ -548,9 +531,6 @@
$f->{data}('Hello');
$f->{http_end}();
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.0');
-
# receiving END_STREAM followed by WINDOW_UPDATE on incomplete request body
$f->{http_start}('/Discard_WU');
@@ -565,8 +545,6 @@
(undef, $frame) = grep { $_->{type} eq "HEADERS" } @$frames;
is($frame->{flags}, 5, 'discard NO_ERROR - trailers');
-}
-
# receiving END_STREAM followed by several RST_STREAM NO_ERROR
$f->{http_start}('/Discard_NE3');
@@ -595,14 +573,8 @@
$frames = $f->{http_start}('/KeepAlive', reuse => 1);
($frame) = grep { $_->{type} eq "HEADERS" } @$frames;
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.5');
-
ok($frame, 'keepalive 3 - connection reused');
-}
-
undef $f;
$f = grpc();
diff --git a/grpc_pass.t b/grpc_pass.t
index 35027de..17130f8 100644
--- a/grpc_pass.t
+++ b/grpc_pass.t
@@ -97,7 +97,7 @@
}
$t->run_daemon(\&dns_daemon, port(8982), $t);
-$t->try_run('no grpc_pass variables')->plan(5);
+$t->run()->plan(5);
$t->waitforfile($t->testdir . '/' . port(8982));
diff --git a/h2.t b/h2.t
index 9e9b8bc..8c1cb00 100644
--- a/h2.t
+++ b/h2.t
@@ -229,9 +229,6 @@
# An endpoint MUST treat a GOAWAY frame with a stream identifier other
# than 0x0 as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.3');
-
$s = Test::Nginx::HTTP2->new();
$s->h2_goaway(1, 0, 5, 'foobar');
$frames = $s->read(all => [{ type => "GOAWAY" }], wait => 0.5);
@@ -240,8 +237,6 @@
ok($frame, 'GOAWAY invalid stream - GOAWAY frame');
is($frame->{code}, 1, 'GOAWAY invalid stream - GOAWAY PROTOCOL_ERROR');
-}
-
# client-initiated PUSH_PROMISE, just to ensure nothing went wrong
# N.B. other implementation returns zero code, which is not anyhow regulated
@@ -592,15 +587,10 @@
$sid = $s->new_stream({ path => '/t2.html', split => [20], split_delay => 2.1 });
$frames = $s->read(all => [{ type => 'RST_STREAM' }]);
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.17.9');
-
($frame) = grep { $_->{type} eq "RST_STREAM" } @$frames;
ok($frame, 'client header timeout 2');
is($frame->{code}, 1, 'client header timeout 2 - protocol error');
-}
-
$s->h2_ping('SEE-THIS');
$frames = $s->read(all => [{ type => 'PING' }]);
diff --git a/h2_headers.t b/h2_headers.t
index 76062a1..3f5f79f 100644
--- a/h2_headers.t
+++ b/h2_headers.t
@@ -42,8 +42,6 @@
listen 127.0.0.1:8082 http2 sndbuf=128;
server_name localhost;
- http2_max_field_size 128k;
- http2_max_header_size 128k;
large_client_header_buffers 2 64k;
location / {
@@ -94,7 +92,6 @@
listen 127.0.0.1:8084 http2;
server_name localhost;
- http2_max_field_size 512;
large_client_header_buffers 4 512;
}
@@ -102,7 +99,6 @@
listen 127.0.0.1:8085 http2;
server_name localhost;
- http2_max_header_size 512;
large_client_header_buffers 1 512;
}
@@ -126,14 +122,7 @@
EOF
$t->run_daemon(\&http_daemon);
-
-# suppress deprecation warning
-
-open OLDERR, ">&", \*STDERR; close STDERR;
-$t->run();
-open STDERR, ">&", \*OLDERR;
-
-$t->waitforsocket('127.0.0.1:' . port(8083));
+$t->run()->waitforsocket('127.0.0.1:' . port(8083));
# file size is slightly beyond initial window size: 2**16 + 80 bytes
diff --git a/h2_max_requests.t b/h2_max_requests.t
index dd49893..8dae1ad 100644
--- a/h2_max_requests.t
+++ b/h2_max_requests.t
@@ -3,7 +3,7 @@
# (C) Sergey Kandaurov
# (C) Nginx, Inc.
-# Tests for HTTP/2 protocol, http2_max_requests directive.
+# Tests for HTTP/2 protocol, keepalive directives.
###############################################################################
@@ -42,7 +42,6 @@
listen 127.0.0.1:8080 http2 sndbuf=1m;
server_name localhost;
- http2_max_requests 2;
keepalive_requests 2;
location / { }
@@ -74,11 +73,7 @@
$t->write_file('index.html', 'SEE-THAT' x 50000);
$t->write_file('t.html', 'SEE-THAT');
-# suppress deprecation warning
-
-open OLDERR, ">&", \*STDERR; close STDERR;
-$t->try_run('no keepalive_time')->plan(19);
-open STDERR, ">&", \*OLDERR;
+$t->run()->plan(19);
###############################################################################
@@ -116,42 +111,26 @@
($frame) = grep { $_->{type} eq "HEADERS" } @$frames;
is($frame->{headers}->{':status'}, 200, 'max requests limited');
-TODO: {
-local $TODO = 'not yet' if ($^O eq 'linux' or $^O eq 'freebsd')
- and !$t->has_version('1.19.1');
-
my @data = grep { $_->{type} eq "DATA" } @$frames;
my $sum = eval join '+', map { $_->{length} } @data;
is($sum, 400000, 'max requests limited - all data received');
-}
-
($frame) = grep { $_->{type} eq "GOAWAY" } @$frames;
ok($frame, 'max requests limited - GOAWAY');
is($frame->{last_sid}, $sid, 'max requests limited - GOAWAY last stream');
# keepalive_timeout 0
-SKIP: {
-skip 'not yet', 2 unless $t->has_version('1.19.7');
-
$s = Test::Nginx::HTTP2->new(port(8081));
$sid = $s->new_stream({ path => '/t.html' });
$frames = $s->read(all => [{ sid => $sid, fin => 1 }, { type => 'GOAWAY' }]);
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.8');
-
($frame) = grep { $_->{type} eq "HEADERS" } @$frames;
is($frame->{headers}->{':status'}, 200, 'keepalive_timeout 0');
-}
-
($frame) = grep { $_->{type} eq "GOAWAY" } @$frames;
ok($frame, 'keepalive_timeout 0 - GOAWAY');
-}
-
# keepalive_time
$s = Test::Nginx::HTTP2->new(port(8082));
@@ -204,18 +183,12 @@
($frame) = grep { $_->{type} eq "HEADERS" } @$frames;
is($frame->{headers}->{':status'}, 200, 'graceful shutdown in idle');
-TODO: {
-local $TODO = 'not yet' if ($^O eq 'linux' or $^O eq 'freebsd')
- and !$t->has_version('1.19.1');
-
-my @data = grep { $_->{type} eq "DATA" } @$frames;
-my $sum = eval join '+', map { $_->{length} } @data;
+@data = grep { $_->{type} eq "DATA" } @$frames;
+$sum = eval join '+', map { $_->{length} } @data;
is($sum, 400000, 'graceful shutdown in idle - all data received');
($frame) = grep { $_->{type} eq "GOAWAY" } @$frames;
ok($frame, 'graceful shutdown in idle - GOAWAY');
is($frame->{last_sid}, $sid, 'graceful shutdown in idle - GOAWAY last stream');
-}
-
###############################################################################
diff --git a/h2_priority.t b/h2_priority.t
index d17c7f5..73b4f37 100644
--- a/h2_priority.t
+++ b/h2_priority.t
@@ -208,9 +208,6 @@
# stream error of type PROTOCOL_ERROR.
# Instead, we respond with a connection error of type PROTOCOL_ERROR.
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.17.4');
-
$s = Test::Nginx::HTTP2->new();
$sid = $s->new_stream();
$s->read(all => [{ sid => $sid, fin => 1 }]);
@@ -222,8 +219,6 @@
is($frame->{last_sid}, $sid, 'dependency - PRIORITY self - GOAWAY');
is($frame->{code}, 1, 'dependency - PRIORITY self - PROTOCOL_ERROR');
-}
-
# HEADERS PRIORITY flag, reprioritize prior PRIORITY frame records
$s = Test::Nginx::HTTP2->new();
@@ -278,19 +273,14 @@
# HEADERS - self dependency
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.17.4');
-
$s = Test::Nginx::HTTP2->new();
$sid = $s->new_stream({ dep => 1 });
$frames = $s->read(all => [{ type => 'GOAWAY' }]);
-my ($frame) = grep { $_->{type} eq "GOAWAY" } @$frames;
+($frame) = grep { $_->{type} eq "GOAWAY" } @$frames;
is($frame->{last_sid}, 0, 'dependency - HEADERS self - GOAWAY');
is($frame->{code}, 1, 'dependency - HEADERS self - PROTOCOL_ERROR');
-}
-
# PRIORITY frame, weighted dependencies
$s = Test::Nginx::HTTP2->new();
@@ -402,7 +392,7 @@
{ sid => $sid3, fin => 1 },
]);
-my ($frame) = grep { $_->{type} eq "DATA" && $_->{sid} == $sid } @$frames;
+($frame) = grep { $_->{type} eq "DATA" && $_->{sid} == $sid } @$frames;
is($frame->{length}, 81, 'removed dependency - first stream');
($frame) = grep { $_->{type} eq "DATA" && $_->{sid} == $sid3 } @$frames;
diff --git a/h2_proxy_request_buffering_redirect.t b/h2_proxy_request_buffering_redirect.t
index 3617a44..7805880 100644
--- a/h2_proxy_request_buffering_redirect.t
+++ b/h2_proxy_request_buffering_redirect.t
@@ -72,15 +72,6 @@
# unbuffered request body
-SKIP: {
-skip 'leaves coredump', 1 unless $t->has_version('1.17.4')
- or $ENV{TEST_NGINX_UNSAFE};
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.17.4');
-
-$t->todo_alerts() unless $t->has_version('1.17.4');
-
my $s = Test::Nginx::HTTP2->new();
my $sid = $s->new_stream({ body_more => 1 });
@@ -92,8 +83,4 @@
my ($frame) = grep { $_->{type} eq "HEADERS" } @$frames;
is($frame->{headers}->{':status'}, 200, 'discard body rest on redirect');
-}
-
-}
-
###############################################################################
diff --git a/h2_request_body.t b/h2_request_body.t
index c992dd4..5df0a6f 100644
--- a/h2_request_body.t
+++ b/h2_request_body.t
@@ -168,9 +168,6 @@
# request body discarded
# RST_STREAM with zero code received
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.17.4');
-
$s = Test::Nginx::HTTP2->new();
$sid = $s->new_stream({ body_more => 1 });
$frames = $s->read(all => [{ type => 'RST_STREAM' }], wait => 0.5);
@@ -178,8 +175,6 @@
($frame) = grep { $_->{type} eq "RST_STREAM" } @$frames;
is($frame->{code}, 0, 'request body discarded - zero RST_STREAM');
-}
-
# malformed request body length not equal to content-length
$s = Test::Nginx::HTTP2->new();
@@ -465,10 +460,6 @@
# request body after 400 errors redirected to a proxied location
-TODO: {
-todo_skip 'leaves coredump', 1 unless $ENV{TEST_NGINX_UNSAFE}
- or $t->has_version('1.19.3');
-
$s = Test::Nginx::HTTP2->new();
$sid = $s->new_stream({ body => "", headers => [
{ name => ':method', value => "" }]});
@@ -477,8 +468,6 @@
($frame) = grep { $_->{type} eq 'DATA' } @$frames;
is($frame->{data}, 'SEE-THIS', 'request body after 400 redirect');
-}
-
###############################################################################
sub read_body_file {
diff --git a/h2_request_body_js.t b/h2_request_body_js.t
index bba5578..15efa48 100644
--- a/h2_request_body_js.t
+++ b/h2_request_body_js.t
@@ -71,9 +71,6 @@
###############################################################################
-local $TODO = 'not yet' unless $t->has_version('1.19.3');
-$t->todo_alerts() unless $t->has_version('1.19.3');
-
my $s = Test::Nginx::HTTP2->new();
my $sid = $s->new_stream({ body => 'TEST' });
my $frames = $s->read(all => [{ sid => $sid, fin => 1 }]);
@@ -85,6 +82,4 @@
($frame) = grep { $_->{type} eq "DATA" } @$frames;
is($frame->{data}, 'SEE-THIS', 'response body');
-$t->stop();
-
###############################################################################
diff --git a/http_host.t b/http_host.t
index 94f51ea..8b9f6ad 100644
--- a/http_host.t
+++ b/http_host.t
@@ -169,13 +169,8 @@
is(http_host_header('123.40.56.78:9000:80'), '123.40.56.78',
'double port hack');
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.17.9');
-
like(http_host_header("localhost\nHost: again", 1), qr/ 400 /, 'host repeat');
-}
-
###############################################################################
sub http_host_header {
diff --git a/http_include.t b/http_include.t
index d4ee01b..8d36a17 100644
--- a/http_include.t
+++ b/http_include.t
@@ -77,7 +77,7 @@
$t->write_file('lmt.conf', 'deny all;');
$t->write_file('ups.conf', "server 127.0.0.1:$p;");
-$t->try_run('no include in any context')->plan(5);
+$t->run()->plan(5);
###############################################################################
diff --git a/http_keepalive.t b/http_keepalive.t
index be6324d..4e30db5 100644
--- a/http_keepalive.t
+++ b/http_keepalive.t
@@ -85,7 +85,7 @@
$t->write_file('safari', '');
$t->write_file('none', '');
$t->write_file('zero', '');
-$t->try_run('no keepalive_time')->plan(21);
+$t->run()->plan(21);
###############################################################################
@@ -143,14 +143,8 @@
read_keepalive($s);
shutdown($s, 1);
-TODO: {
-local $TODO = 'not yet' unless ($^O eq 'MSWin32' or $^O eq 'solaris')
- or $t->has_version('1.19.9');
-
ok(IO::Select->new($s)->can_read(3), 'EOF in discard body');
-}
-
$t->stop();
TODO: {
diff --git a/http_uri.t b/http_uri.t
index f6317ea..0345536 100644
--- a/http_uri.t
+++ b/http_uri.t
@@ -64,30 +64,18 @@
like(http_get('http://localhost'), qr!x / x!, 'absolute');
like(http_get('http://localhost/'), qr!x / x!, 'absolute slash');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.6');
-
like(http_get('http://localhost?args'), qr!x / x.*y args y!ms,
'absolute args');
like(http_get('http://localhost?args#frag'), qr!x / x.*y args y!ms,
'absolute args and frag');
-}
-
like(http_get('http://localhost:8080'), qr!x / x!, 'port');
like(http_get('http://localhost:8080/'), qr!x / x!, 'port slash');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.6');
-
like(http_get('http://localhost:8080?args'), qr!x / x.*y args y!ms,
'port args');
like(http_get('http://localhost:8080?args#frag'), qr!x / x.*y args y!ms,
'port args and frag');
-}
-
like(http_get('/ /'), qr!x / / x!, 'space');
###############################################################################
diff --git a/http_variables.t b/http_variables.t
index 7ea6325..5a16a62 100644
--- a/http_variables.t
+++ b/http_variables.t
@@ -82,14 +82,8 @@
http_get('/../bad_uri');
http_get('/redefine');
-TODO: {
-todo_skip 'overflow', 1 unless $ENV{TEST_NGINX_UNSAFE}
- or $t->has_version('1.19.0');
-
like(http_get('/arg?l=42'), qr/42:$/, 'arg');
-}
-
# $limit_rate is a special variable that has its own set_handler / get_handler
like(http_get('/limit_rate?l=40k'), qr/X-Rate: 40960/, 'limit_rate handlers');
diff --git a/ignore_invalid_headers.t b/ignore_invalid_headers.t
index 44b13ad..b3d9a30 100644
--- a/ignore_invalid_headers.t
+++ b/ignore_invalid_headers.t
@@ -101,16 +101,11 @@
# ignore_invalid_headers off; headers parsing post 8f55cb5c7e79
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.17.5');
-
unlike(http('GET /v HTTP/1.0' . CRLF
. 'Host: localhost' . CRLF
. 'coo: foo' . CRLF
. '</kie>: x-bar' . CRLF . CRLF), qr/x-bar/, 'off - several');
-}
-
# ignore_invalid_headers on;
unlike(get($us, 8081), qr/x-bar/, 'on - underscore');
diff --git a/js_subrequests.t b/js_subrequests.t
index edf6d44..6452e93 100644
--- a/js_subrequests.t
+++ b/js_subrequests.t
@@ -508,20 +508,7 @@
is(get_json('/sr_body'), '{"a":{"b":1}}', 'sr_body');
is(get_json('/sr_body_special'), '{"e":"msg"}', 'sr_body_special');
is(get_json('/sr_in_variable_handler'), '["CB-VAR"]', 'sr_in_variable_handler');
-
-$t->todo_alerts() if $t->read_file('nginx.conf') =~ /aio (on|threads)/
- and !$t->has_version('1.17.9');
-
-TODO: {
-local $TODO = 'header already sent' if $t->read_file('nginx.conf') =~ /aio on/
- and !$t->has_version('1.17.9');
-local $TODO = 'open socket left' if $t->read_file('nginx.conf') =~ /aio thread/
- and !$t->has_version('1.17.9');
-
is(get_json('/sr_file'), '["SEE-THIS"]', 'sr_file');
-
-}
-
is(get_json('/sr_cache?c=1'), '["SEE-THIS"]', 'sr_cache');
is(get_json('/sr_cache?c=1'), '["SEE-THIS"]', 'sr_cached');
is(get_json('/sr_js_in_subrequest'), '["JS-SUB"]', 'sr_js_in_subrequest');
diff --git a/limit_conn_dry_run.t b/limit_conn_dry_run.t
index 2ea63dc..3a31dea 100644
--- a/limit_conn_dry_run.t
+++ b/limit_conn_dry_run.t
@@ -74,7 +74,7 @@
EOF
$t->write_file('w', '');
-$t->try_run('no limit_conn_dry_run/limit_conn_status')->plan(6);
+$t->run()->plan(6);
###############################################################################
diff --git a/limit_rate.t b/limit_rate.t
index b9644b4..245c5e8 100644
--- a/limit_rate.t
+++ b/limit_rate.t
@@ -82,7 +82,7 @@
EOF
$t->write_file('data', 'X' x 30000);
-$t->try_run('no limit_rate variables')->plan(7);
+$t->run()->plan(7);
###############################################################################
diff --git a/limit_req_dry_run.t b/limit_req_dry_run.t
index 2376d47..24c5e9b 100644
--- a/limit_req_dry_run.t
+++ b/limit_req_dry_run.t
@@ -70,7 +70,7 @@
$t->write_file('delay', 'SEE-THIS');
$t->write_file('reject', 'SEE-THIS');
-$t->try_run('no limit_req_dry_run/limit_req_status')->plan(8);
+$t->run()->plan(8);
###############################################################################
diff --git a/mail_proxy_protocol.t b/mail_proxy_protocol.t
index 2a7d54a..d4f4852 100644
--- a/mail_proxy_protocol.t
+++ b/mail_proxy_protocol.t
@@ -92,7 +92,7 @@
EOF
$t->run_daemon(\&Test::Nginx::SMTP::smtp_test_daemon);
-$t->try_run('no proxy_protocol')->plan(8);
+$t->run()->plan(8);
$t->waitforsocket('127.0.0.1:' . port(8026));
diff --git a/mail_proxy_smtp_auth.t b/mail_proxy_smtp_auth.t
index 28ef0fc..4eb92b9 100644
--- a/mail_proxy_smtp_auth.t
+++ b/mail_proxy_smtp_auth.t
@@ -76,7 +76,7 @@
EOF
$t->run_daemon(\&Test::Nginx::SMTP::smtp_test_daemon);
-$t->try_run('no proxy_smtp_auth')->plan(7);
+$t->run()->plan(7);
$t->waitforsocket('127.0.0.1:' . port(8026));
diff --git a/mail_resolver.t b/mail_resolver.t
index 6b375d0..36d7130 100644
--- a/mail_resolver.t
+++ b/mail_resolver.t
@@ -296,10 +296,6 @@
# before 1.17.3, read event while in resolving resulted in duplicate resolving
-TODO: {
-todo_skip 'leaves coredump', 1 unless $ENV{TEST_NGINX_UNSAFE}
- or $t->has_version('1.17.3');
-
my %ssl = (
SSL => 1,
SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE(),
@@ -319,8 +315,6 @@
$s->send('QUIT');
$s->read();
-}
-
###############################################################################
sub reply_handler {
diff --git a/mail_ssl_conf_command.t b/mail_ssl_conf_command.t
index f505e44..ba385ed 100644
--- a/mail_ssl_conf_command.t
+++ b/mail_ssl_conf_command.t
@@ -88,7 +88,7 @@
or die "Can't create certificate for $name: $!\n";
}
-$t->try_run('no ssl_conf_command')->plan(3);
+$t->run()->plan(3);
###############################################################################
diff --git a/memcached_fake_extra.t b/memcached_fake_extra.t
index ea23f3c..1eb6060 100644
--- a/memcached_fake_extra.t
+++ b/memcached_fake_extra.t
@@ -57,8 +57,6 @@
###############################################################################
-$t->todo_alerts() unless $t->has_version('1.19.1');
-
like(http_get('/'), qr/SEE-THIS/, 'memcached data after trailer');
###############################################################################
diff --git a/merge_slashes.t b/merge_slashes.t
index 4447bbc..7407cab 100644
--- a/merge_slashes.t
+++ b/merge_slashes.t
@@ -52,8 +52,6 @@
###############################################################################
-local $TODO = 'not yet' unless $t->has_version('1.17.5');
-
like(http_get('/foo//../bar'), qr!x /foo/bar x!, 'merge slashes');
like(http_get('/foo///../bar'), qr!x /foo//bar x!, 'merge slashes 2');
diff --git a/mp4.t b/mp4.t
index 872e633..88ca1e9 100644
--- a/mp4.t
+++ b/mp4.t
@@ -117,16 +117,8 @@
# corrupted formats
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.17.9');
-
like(http_get("/bad.mp4?start=0.5"), qr/500 Internal/, 'co64 chunk beyond EOF');
-}
-
-$t->todo_alerts() if $t->read_file('nginx.conf') =~ /sendfile on/
- and !$t->has_version('1.17.9');
-
###############################################################################
sub durations {
diff --git a/not_modified_finalize.t b/not_modified_finalize.t
index ae5d9ef..306acf2 100644
--- a/not_modified_finalize.t
+++ b/not_modified_finalize.t
@@ -84,14 +84,8 @@
http_get('/t.html');
-TODO: {
-todo_skip 'leaves coredump', 1 unless $ENV{TEST_NGINX_UNSAFE}
- or $t->has_version('1.17.1');
-
like(http_match_get('/t.html'), qr//, 'request 412 cached');
-}
-
###############################################################################
sub http_match_get {
diff --git a/perl.t b/perl.t
index 0522c50..b5ede66 100644
--- a/perl.t
+++ b/perl.t
@@ -196,29 +196,18 @@
), qr/Content-Length: (?!42).*^xx\x0d.*^xxx\x0d/ms,
'perl header_out content-length multipart');
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.17.2');
-
like(http(
'GET /range HTTP/1.0' . CRLF
. 'Host: localhost' . CRLF
. 'Range: bytes=100000-' . CRLF . CRLF
), qr|^\QHTTP/1.1 416\E.*(?!xxx)|ms, 'perl range not satisfiable');
-}
-
-TODO: {
-todo_skip 'leaves coredump', 1 unless $t->has_version('1.17.1')
- or $ENV{TEST_NGINX_UNSAFE};
-
like(http(
'GET / HTTP/1.0' . CRLF
. 'Host: localhost' . CRLF
. 'If-Match: tt' . CRLF . CRLF
), qr|200 OK|ms, 'perl precondition failed');
-}
-
# various request body tests
like(http_get('/body'), qr/400 Bad Request/, 'perl no body');
@@ -287,9 +276,6 @@
. '0' . CRLF . CRLF
), qr/host: localhost/, 'perl body discard');
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.17.2');
-
like(http(
'GET /discard HTTP/1.1' . CRLF
. 'Host: localhost' . CRLF
@@ -310,6 +296,4 @@
. '0' . CRLF . CRLF
), qr/400 Bad Request/, 'perl body bad chunk');
-}
-
###############################################################################
diff --git a/proxy_cache_min_free.t b/proxy_cache_min_free.t
index 8fdc739..6daeebf 100644
--- a/proxy_cache_min_free.t
+++ b/proxy_cache_min_free.t
@@ -64,7 +64,7 @@
EOF
$t->write_file('t.html', 'SEE-THIS');
-$t->try_run('no proxy_cache_path min_free')->plan(2);
+$t->run()->plan(2);
###############################################################################
diff --git a/proxy_cache_use_stale.t b/proxy_cache_use_stale.t
index 8fbd838..9326636 100644
--- a/proxy_cache_use_stale.t
+++ b/proxy_cache_use_stale.t
@@ -179,17 +179,11 @@
sleep 2;
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.3');
-
# stale 5xx response is ignored since 1.19.3,
# "proxy_cache_use_stale updating;" allows to get it still
like(http_get('/t.html?e=1'), qr/ 500 /, 's-i-e - stale 5xx ignore');
like(http_get('/tt.html?e=1'), qr/ 500 /, 's-i-e - stale 5xx ignore 2');
-
-}
-
like(http_get('/updating/tt.html'), qr/STALE/, 's-i-e - stale 5xx updating');
like(http_get('/t.html'), qr/REVALIDATED/, 's-i-e - revalidated');
@@ -201,14 +195,8 @@
's-w-r - unconditional revalidate');
like(http_get('/t4.html'), qr/HIT/, 's-w-r - unconditional revalidated');
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.3');
-
like(http_get('/t5.html?e=1'), qr/ 500 /,
's-w-r - foreground revalidate error');
-
-}
-
like(http_get('/t5.html'), qr/REVALIDATED/, 's-w-r - foreground revalidated');
# proxy_pass to regular expression with named and positional captures
diff --git a/proxy_cache_vary.t b/proxy_cache_vary.t
index 30ed4b0..48f29b7 100644
--- a/proxy_cache_vary.t
+++ b/proxy_cache_vary.t
@@ -262,14 +262,8 @@
get1('/cold?vary=z', 'z:1');
like(get1('/cold?vary=x,y', 'x:1'), qr/MISS/, 'change first');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.3');
-
like(get1('/cold?vary=x,y', 'x:1'), qr/HIT/, 'change first cached');
-}
-
like(get1('/cold?vary=x,y&xtra=1', 'x:2'), qr/MISS/, 'change second');
like(get1('/cold?vary=x,y&xtra=1', 'x:2'), qr/HIT/, 'change second cached');
@@ -282,23 +276,12 @@
# triggering "cache file .. has too long header" critical errors
like(get1('/cold?vary=x,y', 'x:1'), qr/HIT/, 'cold first');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.3');
-
like(get1('/cold?vary=x,y&xtra=1', 'x:2'), qr/HIT/, 'cold second');
-}
-
$t->stop();
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.3');
-
like(`grep -F '[crit]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no crit');
-}
-
###############################################################################
sub get {
diff --git a/proxy_chunked_extra.t b/proxy_chunked_extra.t
index af5f873..5e8de63 100644
--- a/proxy_chunked_extra.t
+++ b/proxy_chunked_extra.t
@@ -59,13 +59,8 @@
###############################################################################
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.1');
-
like(http_get('/'), qr/200 OK(?!.*zzz)/s, 'chunked with extra data');
-}
-
###############################################################################
sub http_chunked_daemon {
diff --git a/proxy_cookie_flags.t b/proxy_cookie_flags.t
index 5f7bd69..1bf18c9 100644
--- a/proxy_cookie_flags.t
+++ b/proxy_cookie_flags.t
@@ -77,7 +77,7 @@
EOF
-$t->try_run('no proxy_cookie_flags')->plan(14);
+$t->run()->plan(14);
###############################################################################
diff --git a/proxy_extra_data.t b/proxy_extra_data.t
index 03e8aa4..4345f13 100644
--- a/proxy_extra_data.t
+++ b/proxy_extra_data.t
@@ -74,13 +74,7 @@
###############################################################################
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.1');
-
like(http_get('/'), qr/SEE-THIS(?!-BUT-NOT-THIS)/, 'response with extra data');
-
-}
-
like(http_get('/short'), qr/SEE-THIS(?!.*:after)/s, 'too short response');
like(http_get('/empty'), qr/200 OK(?!.*:after)/s, 'empty too short response');
@@ -90,14 +84,8 @@
# unbuffered responses
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.1');
-
like(http_get('/unbuf/'), qr/SEE-THIS(?!-BUT-NOT-THIS)/,
'unbuffered with extra data');
-
-}
-
like(http_get('/unbuf/short'), qr/SEE-THIS(?!.*:after)/s,
'unbuffered too short response');
like(http_get('/unbuf/empty'), qr/200 OK(?!.*:after)/s,
@@ -119,38 +107,17 @@
like(http_get('/head/empty'), qr/SEE-THIS/, 'head no body cached');
like(http_get('/head/matching'), qr/SEE-THIS/, 'head matching cached');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.1');
-
like(http_get('/head/extra'), qr/SEE-THIS(?!-BUT-NOT-THIS)/s,
'head extra cached');
-
-}
-
like(http_get('/head/short'), qr/SEE-THIS(?!.*:after)/s,
'head too short cached');
-
# "zero size buf" alerts (ticket #2117)
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.1');
-
like(http_get('/zero'), qr/200 OK(?!.*NOT-THIS)/s, 'zero size');
-
-}
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.7');
-
like(http_get('/unbuf/zero'), qr/200 OK(?!.*NOT-THIS)/s,
'unbuffered zero size');
-}
-
-$t->todo_alerts() if $t->has_version('1.19.1') and !$t->has_version('1.19.7');
-
###############################################################################
sub http_daemon {
diff --git a/proxy_force_ranges.t b/proxy_force_ranges.t
index 2cc910d..3453f65 100644
--- a/proxy_force_ranges.t
+++ b/proxy_force_ranges.t
@@ -109,14 +109,9 @@
# range sent using chunked transfer encoding
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.17.0');
-
like(http_get_range('/proxy/t.html', 'Range: bytes=-2'),
qr/2${CRLF}IS${CRLF}0$CRLF$CRLF$/, 'no dublicate final chunk');
-}
-
###############################################################################
sub http_get_range {
diff --git a/proxy_next_upstream.t b/proxy_next_upstream.t
index a11f007..b789cd7 100644
--- a/proxy_next_upstream.t
+++ b/proxy_next_upstream.t
@@ -146,11 +146,6 @@
# make sure backend marked as down doesn't count towards "no live upstreams"
# after all backends are tried with http_404
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.6');
-
like(http_get('/down/'), qr/Not Found/, 'all tried with down');
-}
-
###############################################################################
diff --git a/proxy_protocol2_server.t b/proxy_protocol2_server.t
index 7d4f36e..23ddc7e 100644
--- a/proxy_protocol2_server.t
+++ b/proxy_protocol2_server.t
@@ -70,7 +70,7 @@
EOF
$t->write_file('t1', 'SEE-THIS');
-$t->try_run('no proxy_protocol_server_addr')->plan(28);
+$t->run()->plan(28);
###############################################################################
diff --git a/proxy_protocol_server.t b/proxy_protocol_server.t
index da26669..44bbedc 100644
--- a/proxy_protocol_server.t
+++ b/proxy_protocol_server.t
@@ -72,7 +72,7 @@
EOF
$t->write_file('t1', 'SEE-THIS');
-$t->try_run('no proxy_protocol_server_addr')->plan(24);
+$t->run()->plan(24);
###############################################################################
diff --git a/proxy_ssl_conf_command.t b/proxy_ssl_conf_command.t
index 3d0ba70..b2d37fd 100644
--- a/proxy_ssl_conf_command.t
+++ b/proxy_ssl_conf_command.t
@@ -89,7 +89,7 @@
}
$t->write_file('index.html', '');
-$t->try_run('no proxy_ssl_conf_command')->plan(1);
+$t->run()->plan(1);
###############################################################################
diff --git a/rewrite.t b/rewrite.t
index 1bae290..31b1a6f 100644
--- a/rewrite.t
+++ b/rewrite.t
@@ -239,11 +239,6 @@
# break
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.17.8');
-
like(http_get('/break'), qr/200/, 'valid_location reset');
-}
-
###############################################################################
diff --git a/scgi_extra_data.t b/scgi_extra_data.t
index aee5b11..249d7e1 100644
--- a/scgi_extra_data.t
+++ b/scgi_extra_data.t
@@ -81,24 +81,16 @@
###############################################################################
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.1');
-
like(http_get('/'), qr/SEE-THIS(?!-BUT-NOT-THIS)/, 'response with extra data');
like(http_get('/short'), qr/SEE-THIS(?!.*:after)/s, 'too short response');
like(http_get('/empty'), qr/200 OK(?!.*:after)/s, 'empty too short response');
-}
-
like(http_head('/'), qr/200 OK(?!.*SEE-THIS)/s, 'no data in HEAD');
like(http_head('/short'), qr/200 OK(?!.*SEE-THIS)/s, 'too short to HEAD');
like(http_head('/empty'), qr/200 OK/, 'empty response to HEAD');
# unbuffered responses
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.1');
-
like(http_get('/unbuf/'), qr/SEE-THIS(?!-BUT-NOT-THIS)/,
'unbuffered with extra data');
like(http_get('/unbuf/short'), qr/SEE-THIS(?!.*:after)/s,
@@ -106,8 +98,6 @@
like(http_get('/unbuf/empty'), qr/200 OK(?!.*:after)/s,
'unbuffered empty too short response');
-}
-
like(http_head('/unbuf/'), qr/200 OK(?!.*SEE-THIS)/s,
'unbuffered no data in HEAD');
like(http_head('/unbuf/short'), qr/200 OK(?!.*SEE-THIS)/s,
@@ -124,36 +114,17 @@
like(http_get('/head/empty'), qr/SEE-THIS/, 'head no body cached');
like(http_get('/head/matching'), qr/SEE-THIS/, 'head matching cached');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.1');
-
like(http_get('/head/extra'), qr/SEE-THIS(?!-BUT-NOT-THIS)/s,
'head extra cached');
like(http_get('/head/short'), qr/SEE-THIS(?!.*:after)/s,
'head too short cached');
-}
-
# "zero size buf" alerts (ticket #2117)
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.1');
-
like(http_get('/zero'), qr/200 OK(?!.*NOT-THIS)/s, 'zero size');
-
-}
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.7');
-
like(http_get('/unbuf/zero'), qr/200 OK(?!.*NOT-THIS)/s,
'unbuffered zero size');
-}
-
-$t->todo_alerts() if $t->has_version('1.19.1') and !$t->has_version('1.19.7');
-
###############################################################################
sub scgi_daemon {
diff --git a/slice.t b/slice.t
index 841d285..26dba3f 100644
--- a/slice.t
+++ b/slice.t
@@ -15,7 +15,7 @@
BEGIN { use FindBin; chdir($FindBin::Bin); }
use lib 'lib';
-use Test::Nginx qw/ :DEFAULT http_end /;
+use Test::Nginx;
###############################################################################
@@ -134,14 +134,8 @@
$r = get('/proxy/t', 'Range: bytes=3-4');
like($r, qr/ 206 /, 'proxy - 206 partial reply');
like($r, qr/^34$/m, 'proxy - correct content');
-
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.2');
-
unlike($r, qr/Accept-Ranges/, 'proxy - no original accept-ranges');
-}
-
$r = get('/cache/t?single', "Range: bytes=0-0");
like($r, qr/ 206 /, 'single - 206 partial reply');
like($r, qr/^0$/m, 'single - correct content');
diff --git a/ssl.t b/ssl.t
index 1fc516f..610fb02 100644
--- a/ssl.t
+++ b/ssl.t
@@ -318,13 +318,8 @@
# close_notify is sent before lingering close
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.5');
-
is(get_ssl_shutdown(8085), 1, 'ssl shutdown on lingering close');
-}
-
$t->stop();
TODO: {
diff --git a/ssl_conf_command.t b/ssl_conf_command.t
index c863407..766c533 100644
--- a/ssl_conf_command.t
+++ b/ssl_conf_command.t
@@ -88,7 +88,7 @@
or die "Can't create certificate for $name: $!\n";
}
-$t->try_run('no ssl_conf_command')->plan(3);
+$t->run()->plan(3);
###############################################################################
diff --git a/ssl_ocsp.t b/ssl_ocsp.t
index 629c1e3..9769bf2 100644
--- a/ssl_ocsp.t
+++ b/ssl_ocsp.t
@@ -287,7 +287,7 @@
$t->run_daemon(\&http_daemon, $t, port(8081));
$t->run_daemon(\&http_daemon, $t, port(8082));
-$t->try_run('no ssl_ocsp')->plan(14);
+$t->run()->plan(14);
$t->waitforsocket("127.0.0.1:" . port(8081));
$t->waitforsocket("127.0.0.1:" . port(8082));
@@ -300,16 +300,10 @@
# demonstrate that ocsp int request is failed due to missing resolver
-TODO: {
-todo_skip 'leaves coredump', 1 unless $t->has_version('1.19.1')
- or $ENV{TEST_NGINX_UNSAFE};
-
like(get('RSA', 'end', sni => 'resolver'),
qr/400 Bad.*FAILED:certificate status request failed/s,
'ocsp many failed request');
-}
-
# demonstrate that ocsp int request is actually made by failing ocsp response
like(get('RSA', 'end', port => 8444),
diff --git a/ssl_reject_handshake.t b/ssl_reject_handshake.t
index 2011404..3386b35 100644
--- a/ssl_reject_handshake.t
+++ b/ssl_reject_handshake.t
@@ -109,7 +109,12 @@
}
$t->write_file('index.html', '');
-$t->try_run('no ssl_reject_handshake')->plan(9);
+
+# suppress deprecation warning
+
+open OLDERR, ">&", \*STDERR; close STDERR;
+$t->run()->plan(9);
+open STDERR, ">&", \*OLDERR;
###############################################################################
diff --git a/stream_limit_conn_dry_run.t b/stream_limit_conn_dry_run.t
index c86522f..ca7e528 100644
--- a/stream_limit_conn_dry_run.t
+++ b/stream_limit_conn_dry_run.t
@@ -84,7 +84,7 @@
EOF
$t->write_file('index.html', 'OK');
-$t->try_run('no limit_conn_dry_run/limit_conn_status')->plan(9);
+$t->run()->plan(9);
###############################################################################
diff --git a/stream_limit_rate2.t b/stream_limit_rate2.t
index 663c798..9635810 100644
--- a/stream_limit_rate2.t
+++ b/stream_limit_rate2.t
@@ -102,7 +102,7 @@
$t->run_daemon(\&stream_daemon, port(8080));
$t->run_daemon(\&stream_daemon, port(8087));
-$t->try_run('no proxy_download_rate variables')->plan(9);
+$t->run()->plan(9);
$t->waitforsocket('127.0.0.1:' . port(8080));
$t->waitforsocket('127.0.0.1:' . port(8087));
diff --git a/stream_proxy_next_upstream.t b/stream_proxy_next_upstream.t
index 12fbad5..7e6a231 100644
--- a/stream_proxy_next_upstream.t
+++ b/stream_proxy_next_upstream.t
@@ -104,14 +104,9 @@
$t->stop();
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.6');
-
is($t->read_file('test.log'), '127.0.0.1:' . port(8083) . "\n",
'next down log');
-}
-
###############################################################################
sub stream_daemon {
diff --git a/stream_proxy_ssl_conf_command.t b/stream_proxy_ssl_conf_command.t
index ea56457..e2db3e9 100644
--- a/stream_proxy_ssl_conf_command.t
+++ b/stream_proxy_ssl_conf_command.t
@@ -83,7 +83,7 @@
}
$t->write_file('index.html', '');
-$t->try_run('no proxy_ssl_conf_command')->plan(1);
+$t->run()->plan(1);
###############################################################################
diff --git a/stream_set.t b/stream_set.t
index a5b9b84..582807a 100644
--- a/stream_set.t
+++ b/stream_set.t
@@ -23,7 +23,8 @@
select STDERR; $| = 1;
select STDOUT; $| = 1;
-my $t = Test::Nginx->new()->has(qw/stream stream_return stream_set/);
+my $t = Test::Nginx->new()
+ ->has(qw/stream stream_return stream_map stream_set/);
$t->write_file_expand('nginx.conf', <<'EOF');
@@ -37,7 +38,6 @@
stream {
%%TEST_GLOBALS_STREAM%%
-
map 0 $map_var {
default "original";
}
@@ -58,7 +58,7 @@
EOF
-$t->try_run('no stream set')->plan(2);
+$t->run()->plan(2);
###############################################################################
diff --git a/stream_ssl_conf_command.t b/stream_ssl_conf_command.t
index 33fa457..bf03783 100644
--- a/stream_ssl_conf_command.t
+++ b/stream_ssl_conf_command.t
@@ -88,7 +88,7 @@
or die "Can't create certificate for $name: $!\n";
}
-$t->try_run('no ssl_conf_command')->plan(3);
+$t->run()->plan(3);
###############################################################################
diff --git a/stream_udp_proxy.t b/stream_udp_proxy.t
index 9ceae74..51174ed 100644
--- a/stream_udp_proxy.t
+++ b/stream_udp_proxy.t
@@ -79,9 +79,6 @@
# zero-length payload
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.1');
-
$s = dgram('127.0.0.1:' . port(8982));
$s->write('');
is($s->read(), 'zero', 'upstream read zero bytes');
@@ -91,8 +88,6 @@
is($s->read(), 'zero', 'upstream read zero bytes again');
is($s->read(), '', 'upstream sent zero bytes again');
-}
-
###############################################################################
sub udp_daemon {
diff --git a/stream_upstream_hash.t b/stream_upstream_hash.t
index db231cf..12a8f00 100644
--- a/stream_upstream_hash.t
+++ b/stream_upstream_hash.t
@@ -102,14 +102,9 @@
# fallback to round-robin
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.17.1');
-
like(many(4, port(8084)), qr/$port2: 2, $port3: 2/, 'empty key');
like(many(4, port(8085)), qr/$port2: 2, $port3: 2/, 'empty key - consistent');
-}
-
###############################################################################
sub many {
diff --git a/upstream_hash.t b/upstream_hash.t
index 8edbe95..e513a7e 100644
--- a/upstream_hash.t
+++ b/upstream_hash.t
@@ -180,14 +180,9 @@
# fallback to round-robin
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.17.1');
-
like(many('/?a=', 6), qr/$p1: 2, $p2: 2, $p3: 2/, 'empty key');
like(many('/c?a=', 6), qr/$p1: 2, $p2: 2, $p3: 2/, 'empty key - consistent');
-}
-
my @res = iter('/', 10);
is(@res, 10, 'all hashed peers');
diff --git a/upstream_keepalive.t b/upstream_keepalive.t
index af9b869..6227df5 100644
--- a/upstream_keepalive.t
+++ b/upstream_keepalive.t
@@ -77,7 +77,7 @@
EOF
$t->write_file('index.html', 'SEE-THIS');
-$t->try_run('no keepalive_time')->plan(11);
+$t->run()->plan(11);
###############################################################################
diff --git a/userid_flags.t b/userid_flags.t
index cf3661a..9214d7f 100644
--- a/userid_flags.t
+++ b/userid_flags.t
@@ -70,7 +70,7 @@
$t->write_file('index.html', '');
$t->write_file('lax', '');
$t->write_file('many', '');
-$t->try_run('no userid_flags')->plan(5);
+$t->run()->plan(5);
###############################################################################
diff --git a/uwsgi_ssl.t b/uwsgi_ssl.t
index 514d410..1c5c035 100644
--- a/uwsgi_ssl.t
+++ b/uwsgi_ssl.t
@@ -112,9 +112,6 @@
###############################################################################
-TODO: {
-todo_skip 'not yet', 7 unless $t->has_version('1.19.1');
-
like(http_get('/'), qr/SEE-THIS/, 'uwsgi request');
like(http_head('/head'), qr/200 OK(?!.*SEE-THIS)/s, 'no data in HEAD');
@@ -128,8 +125,6 @@
like(http_post('/'), qr/SEE-THIS/, 'uwsgi post');
like(http_post_big('/'), qr/SEE-THIS/, 'uwsgi big post');
-}
-
###############################################################################
sub http_get_headers {
diff --git a/worker_shutdown_timeout_h2.t b/worker_shutdown_timeout_h2.t
index 7265dd8..d217289 100644
--- a/worker_shutdown_timeout_h2.t
+++ b/worker_shutdown_timeout_h2.t
@@ -63,15 +63,8 @@
$t->stop();
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.17.4');
-
like($t->read_file('access.log'), qr/ (?!504)\d{3} /, 'shutdown timeout');
-}
-
-$t->todo_alerts() unless $t->has_version('1.17.4');
-
###############################################################################
sub http_silent_daemon {
diff --git a/xslt.t b/xslt.t
index b21bc4c..b3b37d0 100644
--- a/xslt.t
+++ b/xslt.t
@@ -118,20 +118,10 @@
'params');
like(http_get("/x3"), qr!200 OK.*data=test entity!ms, 'entities');
like(http_get("/x4"), qr!200 OK.*data=other data!ms, 'several stylesheets');
-
-TODO: {
-todo_skip 'heap-buffer-overflow', 1 unless $t->has_version('1.17.2')
- or $ENV{TEST_NGINX_UNSAFE};
-
like(http_get("/x5"), qr!200 OK.*param1=localhost!ms, 'params variable');
-}
-
# xslt and ranges
-TODO: {
-local $TODO = 'not yet' unless $t->has_version('1.19.2');
-
unlike(http_get("/x1"), qr!Accept-Ranges!, 'no Accept-Ranges');
like(http(<<EOF), qr!200 OK.*test xslt result!ms, 'no ranges');
GET /x1 HTTP/1.1
@@ -141,6 +131,4 @@
EOF
-}
-
###############################################################################