Mercurial > hg > nginx-tests
changeset 1251:766bcbb632ee
Tests: removed TODO and try_run() checks for legacy versions.
line wrap: on
line diff
--- a/access_log_escape.t Thu Nov 23 14:42:47 2017 +0300 +++ b/access_log_escape.t Fri Nov 24 19:58:40 2017 +0300 @@ -57,12 +57,7 @@ $t->stop(); -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.8'); - is($t->read_file('json.log'), '\"1 \\\\ \u001B\u001C \"2' . "\n", 'json'); is($t->read_file('test.log'), '\x221 \x5C \x1B\x1C \x22-2' . "\n", 'default'); -} - ###############################################################################
--- a/addition_buffered.t Thu Nov 23 14:42:47 2017 +0300 +++ b/addition_buffered.t Fri Nov 24 19:58:40 2017 +0300 @@ -62,11 +62,6 @@ # if data is buffered, there should be no interleaved data in output -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.5'); - like(http_get('/proxy/body.html'), qr/^XXXXXafter$/m, 'request'); -} - ###############################################################################
--- a/auth_basic.t Thu Nov 23 14:42:47 2017 +0300 +++ b/auth_basic.t Fri Nov 24 19:58:40 2017 +0300 @@ -95,17 +95,8 @@ like(http_get_auth('/', 'apr1', 'password'), qr!SEETHIS!, 'apr1 md5'); like(http_get_auth('/', 'plain', 'password'), qr!SEETHIS!, 'plain password'); - -SKIP: { - # SHA1 may not be available unless we have OpenSSL - - skip 'no sha1', 2 unless $t->has_module('--with-http_ssl_module') - or $t->has_module('--with-sha1') - or $t->has_module('--with-openssl'); - - like(http_get_auth('/', 'ssha', 'password'), qr!SEETHIS!, 'ssha'); - like(http_get_auth('/', 'sha', 'password'), qr!SEETHIS!, 'sha'); -} +like(http_get_auth('/', 'ssha', 'password'), qr!SEETHIS!, 'ssha'); +like(http_get_auth('/', 'sha', 'password'), qr!SEETHIS!, 'sha'); unlike(http_get_auth('/', 'apr1', '123'), qr!SEETHIS!, 'apr1 md5 wrong'); unlike(http_get_auth('/', 'plain', '123'), qr!SEETHIS!, 'plain wrong');
--- a/config_dump.t Thu Nov 23 14:42:47 2017 +0300 +++ b/config_dump.t Fri Nov 24 19:58:40 2017 +0300 @@ -77,15 +77,10 @@ like($dump, qr!^# configuration file $d/inc2.conf:$!m, 'inc2.conf found'); like($dump, qr!^# configuration file $d/map.conf:$!m, 'map.conf found'); -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.6'); - unlike($dump, qr!(# configuration file $d/inc.conf:).*\1!s, 'inc.conf uniq'); unlike($dump, qr!(# configuration file $d/inc2.conf:).*\1!s, 'inc2.conf uniq'); unlike($dump, qr!(# configuration file $d/map.conf:).*\1!s, 'map.conf uniq'); -} - is(getconf($t, $dump, 'nginx.conf'), $t->read_file('nginx.conf'), 'content'); is(getconf($t, $dump, 'inc.conf'), $t->read_file('inc.conf'), 'content inc'); is(getconf($t, $dump, 'map.conf'), $t->read_file('map.conf'), 'content inc 2');
--- a/geo.t Thu Nov 23 14:42:47 2017 +0300 +++ b/geo.t Fri Nov 24 19:58:40 2017 +0300 @@ -210,15 +210,9 @@ like($r, qr/^X-Ran: loopback/m, 'geo ranges'); like($r, qr/^X-RIn: loopback/m, 'geo ranges include'); -TODO: { -todo_skip 'use-after-free', 2 unless $ENV{TEST_NGINX_UNSAFE} - or $t->has_version('1.11.4'); - like(http_get('/2'), qr/^X-RDe: default/m, 'geo ranges delete'); like(http_get('/2'), qr/^X-RD2: default/m, 'geo ranges delete 2'); -} - like($r, qr/^X-ABe: loopback/m, 'geo ranges add before'); like($r, qr/^X-AAf: loopback/m, 'geo ranges add after'); like($r, qr/^X-Ins: loopback/m, 'geo ranges insert'); @@ -229,16 +223,9 @@ like(http_get('/1?ip=10.0.0.1'), qr/^X-Arg: default/m, 'geo default'); like(http_get('/1?ip=10.0.0.1'), qr/^X-ARa: default/m, 'geo ranges default'); like(http_get('/1?ip=10.13.2.1'), qr/^X-ARa: foo2/m, 'geo ranges add'); - -TODO: { -todo_skip 'use-after-free', 1 unless $ENV{TEST_NGINX_UNSAFE} - or $t->has_version('1.11.4'); - like(http_get('/1?ip=10.11.2.1'), qr/^X-ARa: default/m, 'geo delete range from variable'); -} - like(http_xff('192.0.2.1'), qr/^X-XFF: test/m, 'geo proxy'); like(http_xff('10.0.0.1'), qr/^X-XFF: default/m, 'geo proxy default'); like(http_xff('10.0.0.1, 192.0.2.1'), qr/^X-XFF: test/m, 'geo proxy long');
--- a/h2.t Thu Nov 23 14:42:47 2017 +0300 +++ b/h2.t Fri Nov 24 19:58:40 2017 +0300 @@ -1117,9 +1117,6 @@ # GOAWAY without awaiting active streams, further streams ignored -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.6'); - $s = Test::Nginx::HTTP2->new(port(8080)); $sid = $s->new_stream({ path => '/t1.html' }); $s->read(all => [{ sid => $sid, length => 2**16 - 1 }]); @@ -1137,8 +1134,6 @@ ($frame) = grep { $_->{type} eq 'HEADERS' } @$frames; is($frame, undef, 'GOAWAY with active stream - no new stream'); -} - $s->h2_window(100, $sid); $s->h2_window(100); $frames = $s->read(all => [{ sid => $sid, fin => 0x1 }]);
--- a/h2_auth_request.t Thu Nov 23 14:42:47 2017 +0300 +++ b/h2_auth_request.t Fri Nov 24 19:58:40 2017 +0300 @@ -72,10 +72,6 @@ my ($s, $sid, $frames, $frame); -TODO: { -todo_skip 'use-after-free', 2 unless $ENV{TEST_NGINX_UNSAFE} - or $t->has_version('1.11.7'); - # second stream is used to induce body corruption issue $s = Test::Nginx::HTTP2->new(); @@ -87,6 +83,4 @@ is($frame->{headers}->{'x-body'}, 'A' x 600, 'auth request body'); isnt($frame->{headers}->{'x-body-file'}, undef, 'auth request body file'); -} - ###############################################################################
--- a/h2_fastcgi_request_buffering.t Thu Nov 23 14:42:47 2017 +0300 +++ b/h2_fastcgi_request_buffering.t Fri Nov 24 19:58:40 2017 +0300 @@ -53,18 +53,13 @@ EOF $t->run(); - -my $f = get_body('/chunked'); -plan(skip_all => 'no unbuffered request body') unless $f; -$f->{http_end}(); - $t->plan(48); ############################################################################### # unbuffered request body to fastcgi -$f = get_body('/'); +my $f = get_body('/'); ok($f->{headers}, 'request'); is($f->{upload}('01234', body_more => 1), '01234', 'part'); is($f->{upload}('56789'), '56789_eos', 'part 2');
--- a/h2_max_requests.t Thu Nov 23 14:42:47 2017 +0300 +++ b/h2_max_requests.t Fri Nov 24 19:58:40 2017 +0300 @@ -49,7 +49,7 @@ EOF $t->write_file('index.html', ''); -$t->try_run('no http2_max_requests')->plan(5); +$t->run()->plan(5); ###############################################################################
--- a/h2_proxy_request_buffering.t Thu Nov 23 14:42:47 2017 +0300 +++ b/h2_proxy_request_buffering.t Fri Nov 24 19:58:40 2017 +0300 @@ -66,18 +66,13 @@ EOF $t->run(); - -my $f = get_body('/chunked'); -plan(skip_all => 'no unbuffered request body') unless $f; -$f->{http_end}(); - $t->plan(49); ############################################################################### # unbuffered request body -$f = get_body('/', 'content-length' => 10); +my $f = get_body('/', 'content-length' => 10); ok($f->{headers}, 'request'); is($f->{upload}('01234', body_more => 1), '01234', 'part'); is($f->{upload}('56789'), '56789', 'part 2');
--- a/h2_proxy_request_buffering_ssl.t Thu Nov 23 14:42:47 2017 +0300 +++ b/h2_proxy_request_buffering_ssl.t Fri Nov 24 19:58:40 2017 +0300 @@ -99,18 +99,13 @@ } $t->run(); - -my $f = get_body('/chunked'); -plan(skip_all => 'no unbuffered request body') unless $f; -$f->{http_end}(); - $t->plan(40); ############################################################################### # unbuffered request body -$f = get_body('/', 'content-length' => 10); +my $f = get_body('/', 'content-length' => 10); ok($f->{headers}, 'request'); is($f->{upload}('01234', body_more => 1), '01234', 'part'); is($f->{upload}('56789'), '56789', 'part 2');
--- a/h2_server_tokens.t Thu Nov 23 14:42:47 2017 +0300 +++ b/h2_server_tokens.t Fri Nov 24 19:58:40 2017 +0300 @@ -88,7 +88,7 @@ EOF -$t->try_run('no server_tokens build')->plan(12); +$t->run()->plan(12); ############################################################################### @@ -108,15 +108,10 @@ $re = qr/$re \Q($1)\E/ if $t->{_configure_args} =~ /--build=(\S+)/; -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.10'); - like(header_server('/b/200'), qr/^$re$/, 'http2 tokens build 200'); like(header_server('/b/404'), qr/^$re$/, 'http2 tokens build 404'); like(body('/b/404'), qr/$re/, 'http2 tokens build 404 body'); -} - ############################################################################### sub header_server {
--- a/http_absolute_redirect.t Thu Nov 23 14:42:47 2017 +0300 +++ b/http_absolute_redirect.t Fri Nov 24 19:58:40 2017 +0300 @@ -82,7 +82,7 @@ mkdir($t->testdir() . '/dir'); -$t->try_run('no absolute_redirect')->plan(10); +$t->run()->plan(10); ###############################################################################
--- a/http_resolver_cleanup.t Thu Nov 23 14:42:47 2017 +0300 +++ b/http_resolver_cleanup.t Fri Nov 24 19:58:40 2017 +0300 @@ -25,8 +25,6 @@ my $t = Test::Nginx->new()->has(qw/http proxy/); plan(skip_all => 'win32') if $^O eq 'MSWin32'; -plan(skip_all => 'use-after-free on shutdown') unless $ENV{TEST_NGINX_UNSAFE} - or $t->has_version('1.11.8'); $t->write_file_expand('nginx.conf', <<'EOF')->plan(1);
--- a/image_filter_webp.t Thu Nov 23 14:42:47 2017 +0300 +++ b/image_filter_webp.t Fri Nov 24 19:58:40 2017 +0300 @@ -69,7 +69,7 @@ EOF -$t->try_run('no WebP support')->plan(18); +$t->run()->plan(18); $t->write_file('webp', pack("A4LA8", "RIFF", 0x22, "WEBPVP8 ") . pack("N4", 0x16000000, 0x3001009d, 0x012a0100, 0x01000ec0) .
--- a/mail_capability.t Thu Nov 23 14:42:47 2017 +0300 +++ b/mail_capability.t Fri Nov 24 19:58:40 2017 +0300 @@ -160,15 +160,7 @@ my $caps = get_auth_caps($s); like($caps, qr/USER/, 'pop3 - user'); - -TODO: { -local $TODO = 'not yet' if $t->has_version('1.11.6') - and !$t->has_version('1.11.11'); - like($caps, qr/SASL (PLAIN LOGIN|LOGIN PLAIN) CRAM-MD5/, 'pop3 - methods'); - -} - unlike($caps, qr/STLS/, 'pop3 - no stls'); # pop3 starttls @@ -180,16 +172,8 @@ $caps = get_auth_caps($s); like($caps, qr/USER/, 'pop3 starttls - user'); - -TODO: { -local $TODO = 'not yet' if $t->has_version('1.11.6') - and !$t->has_version('1.11.11'); - like($caps, qr/SASL (PLAIN LOGIN|LOGIN PLAIN) CRAM-MD5/, 'pop3 starttls - methods'); - -} - like($caps, qr/STLS/, 'pop3 startls - stls'); # pop3 starttls only
--- a/mail_imap.t Thu Nov 23 14:42:47 2017 +0300 +++ b/mail_imap.t Fri Nov 24 19:58:40 2017 +0300 @@ -92,7 +92,7 @@ EOF $t->run_daemon(\&Test::Nginx::IMAP::imap_test_daemon); -$t->try_run('no auth external')->plan(14); +$t->run()->plan(14); $t->waitforsocket('127.0.0.1:' . port(8144));
--- a/mail_pop3.t Thu Nov 23 14:42:47 2017 +0300 +++ b/mail_pop3.t Fri Nov 24 19:58:40 2017 +0300 @@ -92,7 +92,7 @@ EOF $t->run_daemon(\&Test::Nginx::POP3::pop3_test_daemon); -$t->try_run('no auth external')->plan(20); +$t->run()->plan(20); $t->waitforsocket('127.0.0.1:' . port(8111)); @@ -128,13 +128,8 @@ $s->send('AUTH'); $s->ok('auth'); -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.11'); - is(get_auth_caps($s), 'PLAIN:LOGIN:CRAM-MD5:EXTERNAL', 'auth capabilities'); -} - # auth plain $s = Test::Nginx::POP3->new();
--- a/mail_smtp.t Thu Nov 23 14:42:47 2017 +0300 +++ b/mail_smtp.t Fri Nov 24 19:58:40 2017 +0300 @@ -90,7 +90,7 @@ EOF $t->run_daemon(\&Test::Nginx::SMTP::smtp_test_daemon); -$t->try_run('no auth external')->plan(30); +$t->run()->plan(30); $t->waitforsocket('127.0.0.1:' . port(8026));
--- a/map_complex.t Thu Nov 23 14:42:47 2017 +0300 +++ b/map_complex.t Fri Nov 24 19:58:40 2017 +0300 @@ -60,7 +60,7 @@ EOF -$t->try_run('no complex value')->plan(3); +$t->run()->plan(3); ###############################################################################
--- a/map_volatile.t Thu Nov 23 14:42:47 2017 +0300 +++ b/map_volatile.t Fri Nov 24 19:58:40 2017 +0300 @@ -73,7 +73,7 @@ mkdir($t->testdir() . '/1'); mkdir($t->testdir() . '/2'); -$t->try_run('no map volatile')->plan(2); +$t->run()->plan(2); ###############################################################################
--- a/mp4.t Thu Nov 23 14:42:47 2017 +0300 +++ b/mp4.t Fri Nov 24 19:58:40 2017 +0300 @@ -83,16 +83,8 @@ is(durations($t, 2.7, 5.6), '2.9 2.9', 'start end float'); is(durations($t, undef, 9), '9.0 9.0', 'end integer'); - -TODO: { -local $TODO = 'not yet' - if $Config{myarchname} =~ /i.86/ && $t->has_module('built by gcc [56]') - and !$t->has_version('1.11.6'); - is(durations($t, undef, 5.6), '5.6 5.6', 'end float'); -} - # invalid range results in ignoring end argument like(http_head("$test_uri?start=1&end=1"), qr/200 OK/, 'zero range');
--- a/mp4_ssi.t Thu Nov 23 14:42:47 2017 +0300 +++ b/mp4_ssi.t Fri Nov 24 19:58:40 2017 +0300 @@ -65,14 +65,9 @@ ############################################################################### -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.5'); - (my $r = get('/')) =~ s/([^\x20-\x7e])/sprintf('\\x%02x', ord($1))/gmxe; unlike($r, qr/\\x0d(\\x0a)?0\\x0d(\\x0a)?\\x0d(\\x0a)?\w/, 'only final chunk'); -} - ############################################################################### sub get {
--- a/msie_refresh_ssi.t Thu Nov 23 14:42:47 2017 +0300 +++ b/msie_refresh_ssi.t Fri Nov 24 19:58:40 2017 +0300 @@ -56,14 +56,9 @@ ############################################################################### -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.5'); - my $r = get('/', 'User-Agent: MSIE foo'); unlike($r, qr/\x0d\x0a?0\x0d\x0a?\x0d\x0a?\w/, 'only final chunk'); -} - ############################################################################### sub get {
--- a/perl_sleep.t Thu Nov 23 14:42:47 2017 +0300 +++ b/perl_sleep.t Fri Nov 24 19:58:40 2017 +0300 @@ -71,12 +71,6 @@ ############################################################################### like(http_get('/sleep'), qr/works/, 'perl sleep'); - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.13'); - like(http_get('/subrequest.html'), qr/works/, 'perl sleep in subrequest'); -} - ###############################################################################
--- a/proxy.t Thu Nov 23 14:42:47 2017 +0300 +++ b/proxy.t Fri Nov 24 19:58:40 2017 +0300 @@ -79,15 +79,8 @@ like(http_get('/var?b=127.0.0.1:' . port(8081) . '/'), qr/SEE-THIS/, 'proxy with variables'); like(http_get('/var?b=u/'), qr/SEE-THIS/, 'proxy with variables to upstream'); - -TODO: { -todo_skip 'heap-buffer-overflow', 1 - unless $ENV{TEST_NGINX_UNSAFE} or $t->has_version('1.11.0'); - ok(http_get("/var?b=[::]"), 'proxy with variables - no ipv6 port'); -} - like(http_get('/timeout'), qr/200 OK/, 'proxy connect timeout'); ###############################################################################
--- a/proxy_bind.t Thu Nov 23 14:42:47 2017 +0300 +++ b/proxy_bind.t Fri Nov 24 19:58:40 2017 +0300 @@ -93,12 +93,6 @@ like(http_get('/inherit'), qr/X-IP: 127.0.0.2/, 'bind inherit'); like(http_get('/off'), qr/X-IP: 127.0.0.1/, 'bind off'); like(http_get('/var?b=127.0.0.2'), qr/X-IP: 127.0.0.2/, 'bind var'); - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.2'); - like(http_get('/port'), qr/Port: (\d+)(?!\d).*Port: \1/s, 'bind port'); -} - ###############################################################################
--- a/proxy_bind_transparent.t Thu Nov 23 14:42:47 2017 +0300 +++ b/proxy_bind_transparent.t Fri Nov 24 19:58:40 2017 +0300 @@ -64,7 +64,7 @@ EOF $t->write_file('index.html', ''); -$t->try_run('no proxy_bind transparent')->plan(1); +$t->run()->plan(1); ###############################################################################
--- a/proxy_cache_bypass.t Thu Nov 23 14:42:47 2017 +0300 +++ b/proxy_cache_bypass.t Fri Nov 24 19:58:40 2017 +0300 @@ -93,12 +93,6 @@ like(http_get('/t2'), qr/403 Forbidden/, 'error cached'); like(http_get('/t2?bypass=1'), qr/NOOP/, 'error cache bypassed'); - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.0'); - like(http_get('/t2'), qr/NOOP/, 'error cached after bypass'); -} - ###############################################################################
--- a/proxy_cache_manager.t Thu Nov 23 14:42:47 2017 +0300 +++ b/proxy_cache_manager.t Fri Nov 24 19:58:40 2017 +0300 @@ -76,7 +76,7 @@ EOF $t->write_file('t.html', 'SEE-THIS'); -$t->try_run('no manager params')->plan(3); +$t->run()->plan(3); ###############################################################################
--- a/proxy_cache_max_range_offset.t Thu Nov 23 14:42:47 2017 +0300 +++ b/proxy_cache_max_range_offset.t Fri Nov 24 19:58:40 2017 +0300 @@ -78,7 +78,7 @@ EOF $t->write_file('t.html', 'SEE-THIS'); -$t->try_run('no proxy_cache_max_range_offset')->plan(8); +$t->run()->plan(8); ###############################################################################
--- a/proxy_cache_use_stale.t Thu Nov 23 14:42:47 2017 +0300 +++ b/proxy_cache_use_stale.t Fri Nov 24 19:58:40 2017 +0300 @@ -135,7 +135,7 @@ $t->write_file('t9.html', 'SEE-THIS' x 1024); $t->write_file('ssi.html', 'xxx <!--#include virtual="/t9.html" --> xxx'); -$t->try_run('no proxy_cache_background_update')->plan(29); +$t->run()->plan(29); ############################################################################### @@ -234,14 +234,8 @@ # this used to access a static file in the update request like(http_get('/t2.html?if=1'), qr/STALE/, 'background update in if'); - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.11'); - like(http_get('/t2.html?if=1'), qr/HIT/, 'background update in if - updated'); -} - ############################################################################### sub get {
--- a/proxy_method.t Thu Nov 23 14:42:47 2017 +0300 +++ b/proxy_method.t Fri Nov 24 19:58:40 2017 +0300 @@ -77,14 +77,9 @@ like(http_get('/const'), qr/request_method=POST/, 'proxy_method from constant'); -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.6'); - like(http_get('/var?method=POST'), qr/request_method=POST/, 'proxy_method from variable'); -} - like(http_get('/parent/child'), qr/request_method=POST/, 'proxy_method from parent');
--- a/proxy_protocol_port.t Thu Nov 23 14:42:47 2017 +0300 +++ b/proxy_protocol_port.t Fri Nov 24 19:58:40 2017 +0300 @@ -64,7 +64,7 @@ EOF $t->write_file('t', 'SEE-THIS'); -$t->try_run('no proxy_protocol_port')->plan(8); +$t->run()->plan(8); ###############################################################################
--- a/proxy_ssl.t Thu Nov 23 14:42:47 2017 +0300 +++ b/proxy_ssl.t Fri Nov 24 19:58:40 2017 +0300 @@ -111,14 +111,8 @@ like(http_get('/ssl_reuse'), qr/200 OK.*X-Session: r/s, 'ssl session reused'); like(http_get('/ssl_reuse'), qr/200 OK.*X-Session: r/s, 'ssl session reused 2'); like(http_get('/timeout'), qr/200 OK/, 'proxy connect timeout'); - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.6'); - like(http_get('/timeout_h'), qr/504 Gateway/, 'proxy handshake timeout'); -} - ############################################################################### sub http_daemon {
--- a/realip_remote_addr.t Thu Nov 23 14:42:47 2017 +0300 +++ b/realip_remote_addr.t Fri Nov 24 19:58:40 2017 +0300 @@ -68,14 +68,8 @@ like(http_get('/'), qr/X-Real-IP: 127.0.0.1/m, 'request redirect'); like(http_xff('/1', '192.0.2.1'), qr/X-Real-IP: 127.0.0.1/m, 'realip'); - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.5'); - like(http_xff('/', '192.0.2.1'), qr/X-Real-IP: 127.0.0.1/m, 'realip redirect'); -} - ############################################################################### sub http_xff {
--- a/realip_remote_port.t Thu Nov 23 14:42:47 2017 +0300 +++ b/realip_remote_port.t Fri Nov 24 19:58:40 2017 +0300 @@ -53,7 +53,7 @@ $t->write_file('index.html', ''); $t->write_file('1', ''); -$t->try_run('no realip_remote_port'); +$t->run(); plan(skip_all => 'no 127.0.0.1 on host') if http_get('/') !~ /X-IP: 127.0.0.1/m; @@ -71,14 +71,9 @@ ($sp, $data) = http_sp_xff('/1', '127.0.0.1:123'); like($data, qr/X-Real-Port: $sp/, 'realip'); -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.5'); - ($sp, $data) = http_sp_xff('/', '127.0.0.1:123'); like($data, qr/X-Real-Port: $sp/, 'realip redirect'); -} - ############################################################################### sub http_sp_get {
--- a/request_id.t Thu Nov 23 14:42:47 2017 +0300 +++ b/request_id.t Fri Nov 24 19:58:40 2017 +0300 @@ -61,7 +61,7 @@ $t->write_file('index.html', ''); $t->write_file('add.html', '<!--#include virtual="/body" -->'); -$t->try_run('no request_id variable support')->plan(12); +$t->run()->plan(12); ###############################################################################
--- a/server_tokens.t Thu Nov 23 14:42:47 2017 +0300 +++ b/server_tokens.t Fri Nov 24 19:58:40 2017 +0300 @@ -87,7 +87,7 @@ EOF -$t->try_run('no server_tokens build')->plan(12); +$t->run()->plan(12); ############################################################################### @@ -107,15 +107,10 @@ $re = qr/$re \Q($1)\E/ if $t->{_configure_args} =~ /--build=(\S+)/; -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.10'); - like(http_get_server('/b/200'), $re, 'tokens build 200'); like(http_get_server('/b/404'), $re, 'tokens build 404'); like(http_body('/b/404'), $re, 'tokens build 404 body'); -} - ############################################################################### sub http_body {
--- a/slice.t Thu Nov 23 14:42:47 2017 +0300 +++ b/slice.t Fri Nov 24 19:58:40 2017 +0300 @@ -285,23 +285,12 @@ # slicing in named location -my $s = http_get('/cache-redirect', start => 1); -# loop protection used with limit_rate, exit loop if subrequest has lost range -unless ($t->has_version('1.11.10')) { - select undef, undef, undef, 0.2; - $t->write_file('/cache-redirect', ''); -} -$r = http_end($s); - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.10'); +$r = http_get('/cache-redirect'); like($r, qr/ 200 .*^0123456789abcdef$/ms, 'in named location'); is(scalar @{[ glob $t->testdir() . '/cach3/*' ]}, 8, 'in named location - cache entries'); -} - ############################################################################### sub get {
--- a/ssi_delayed.t Thu Nov 23 14:42:47 2017 +0300 +++ b/ssi_delayed.t Fri Nov 24 19:58:40 2017 +0300 @@ -67,9 +67,6 @@ ############################################################################### -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.13'); - # If a response sending is delayed by sendfile_max_chunk, and # then we've switched to a different subrequest, which is not yet # ready to handle corresponding write event, wev->delayed won't be @@ -79,8 +76,6 @@ like(http_get('/delayed.html'), qr/x{100}y{1024}SEE-THIS/, 'delayed'); -} - ############################################################################### sub http_daemon {
--- a/ssl.t Thu Nov 23 14:42:47 2017 +0300 +++ b/ssl.t Fri Nov 24 19:58:40 2017 +0300 @@ -234,15 +234,9 @@ like(get('/cipher', 8085), qr/^body [\w-]+$/m, 'cipher'); like(get('/client_verify', 8085), qr/^body NONE$/m, 'client verify'); like(get('/protocol', 8085), qr/^body (TLS|SSL)v(\d|\.)+$/m, 'protocol'); - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.6'); - like(cert('/issuer', 8085), qr!^body CN=issuer$!m, 'issuer'); like(cert('/subject', 8085), qr!^body CN=subject$!m, 'subject'); -} - ############################################################################### sub get {
--- a/ssl2.t Thu Nov 23 14:42:47 2017 +0300 +++ b/ssl2.t Fri Nov 24 19:58:40 2017 +0300 @@ -123,7 +123,7 @@ or die "Can't create certificate for $name: $!\n"; } -$t->try_run('no ssl_ciphers')->plan(4); +$t->run()->plan(4); ###############################################################################
--- a/stream_access_log.t Thu Nov 23 14:42:47 2017 +0300 +++ b/stream_access_log.t Fri Nov 24 19:58:40 2017 +0300 @@ -103,7 +103,7 @@ EOF $t->run_daemon(\&stream_daemon); -$t->try_run('no stream access_log')->plan(10); +$t->run()->plan(10); $t->waitforsocket('127.0.0.1:' . port(8080));
--- a/stream_access_log_escape.t Thu Nov 23 14:42:47 2017 +0300 +++ b/stream_access_log_escape.t Fri Nov 24 19:58:40 2017 +0300 @@ -54,7 +54,7 @@ EOF -$t->try_run('no stream map')->plan(2); +$t->run()->plan(2); ############################################################################### @@ -62,12 +62,7 @@ $t->stop(); -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.8'); - is($t->read_file('json.log'), '\" \\\\ \"foo' . "\n", 'json'); is($t->read_file('test.log'), '\x22 \x5C \x22foo-' . "\n", 'default'); -} - ###############################################################################
--- a/stream_geo.t Thu Nov 23 14:42:47 2017 +0300 +++ b/stream_geo.t Fri Nov 24 19:58:40 2017 +0300 @@ -219,7 +219,7 @@ $t->write_file('geo.conf', '127.0.0.0/8 loopback;'); $t->write_file('geo-ranges.conf', '127.0.0.0-127.255.255.255 loopback;'); -$t->try_run('no stream geo')->plan(19); +$t->run()->plan(19); ############################################################################### @@ -230,15 +230,9 @@ is($data{geo_ranges}, 'loopback', 'geo ranges'); is($data{geo_ranges_include}, 'loopback', 'geo ranges include'); -TODO: { -todo_skip 'use-after-free', 2 unless $ENV{TEST_NGINX_UNSAFE} - or $t->has_version('1.11.4'); - is(stream('127.0.0.1:' . port(8083))->read(), 'default', 'geo ranges delete'); is(stream('127.0.0.1:' . port(8084))->read(), 'default', 'geo ranges delete 2'); -} - is($data{geo_before}, 'loopback', 'geo ranges add before'); is($data{geo_after}, 'loopback', 'geo ranges add after'); is($data{geo_insert}, 'loopback', 'geo ranges insert'); @@ -248,15 +242,9 @@ is($data{geo_from_addr}, 'loopback', 'geo from addr'); is($data{geo_from_var}, 'test', 'geo from var'); -TODO: { -todo_skip 'use-after-free', 1 unless $ENV{TEST_NGINX_UNSAFE} - or $t->has_version('1.11.4'); - is(stream('127.0.0.1:' . port(8085))->read(), 'default', 'geo delete range from variable'); -} - is(stream('127.0.0.1:' . port(8081))->read(), 'default', 'geo default'); is(stream('127.0.0.1:' . port(8082))->read(), 'world', 'geo world'); is(stream('127.0.0.1:' . port(8086))->read(), 'default', 'geo ranges default');
--- a/stream_geo_binary.t Thu Nov 23 14:42:47 2017 +0300 +++ b/stream_geo_binary.t Fri Nov 24 19:58:40 2017 +0300 @@ -61,7 +61,7 @@ "-127." . $_/256/256 % 256 . "." . $_/256 % 256 . "." .$_ % 256 . " " . ($_ == 1 ? "loopback" : "range$_") . ";" } (0 .. 100000))); -$t->try_run('no stream geo')->plan(2); +$t->run()->plan(2); ###############################################################################
--- a/stream_geo_ipv6.t Thu Nov 23 14:42:47 2017 +0300 +++ b/stream_geo_ipv6.t Fri Nov 24 19:58:40 2017 +0300 @@ -86,7 +86,7 @@ EOF -$t->try_run('no stream geo or inet6 support')->plan(6); +$t->try_run('no inet6 support')->plan(6); ###############################################################################
--- a/stream_limit_conn_complex.t Thu Nov 23 14:42:47 2017 +0300 +++ b/stream_limit_conn_complex.t Fri Nov 24 19:58:40 2017 +0300 @@ -62,7 +62,7 @@ EOF $t->write_file('index.html', ''); -$t->try_run('no stream limit_conn with complex value')->plan(4); +$t->run()->plan(4); ###############################################################################
--- a/stream_map.t Thu Nov 23 14:42:47 2017 +0300 +++ b/stream_map.t Fri Nov 24 19:58:40 2017 +0300 @@ -59,7 +59,7 @@ EOF -$t->try_run('no stream map')->plan(5); +$t->run()->plan(5); ###############################################################################
--- a/stream_proxy_complex.t Thu Nov 23 14:42:47 2017 +0300 +++ b/stream_proxy_complex.t Fri Nov 24 19:58:40 2017 +0300 @@ -64,7 +64,7 @@ EOF -$t->try_run('no stream proxy_pass with complex value')->plan(5); +$t->run()->plan(5); ###############################################################################
--- a/stream_proxy_ssl_name_complex.t Thu Nov 23 14:42:47 2017 +0300 +++ b/stream_proxy_ssl_name_complex.t Fri Nov 24 19:58:40 2017 +0300 @@ -78,7 +78,7 @@ or die "Can't create certificate for $name: $!\n"; } -$t->try_run('no stream return')->plan(2); +$t->run()->plan(2); ###############################################################################
--- a/stream_realip.t Thu Nov 23 14:42:47 2017 +0300 +++ b/stream_realip.t Fri Nov 24 19:58:40 2017 +0300 @@ -82,7 +82,7 @@ EOF $t->run_daemon(\&stream_daemon); -$t->try_run('no stream proxy_protocol or inet6 support')->plan(8); +$t->try_run('no inet6 support')->plan(8); $t->waitforsocket('127.0.0.1:' . port(8081)); ###############################################################################
--- a/stream_resolver.t Thu Nov 23 14:42:47 2017 +0300 +++ b/stream_resolver.t Fri Nov 24 19:58:40 2017 +0300 @@ -86,7 +86,7 @@ EOF $t->run_daemon(\&dns_daemon, port(8980), $t); -$t->try_run('no stream resolver')->plan(8); +$t->run()->plan(8); $t->waitforfile($t->testdir . '/' . port(8980));
--- a/stream_split_clients.t Thu Nov 23 14:42:47 2017 +0300 +++ b/stream_split_clients.t Fri Nov 24 19:58:40 2017 +0300 @@ -49,7 +49,7 @@ EOF -$t->try_run('no stream split_clients'); +$t->run(); $t->plan(1); ###############################################################################
--- a/stream_ssl_preread.t Thu Nov 23 14:42:47 2017 +0300 +++ b/stream_ssl_preread.t Fri Nov 24 19:58:40 2017 +0300 @@ -173,13 +173,8 @@ # allow record with older SSL version, such as 3.0 -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.8'); - is(get_oldver(), 'foo', 'older version in ssl record'); -} - $t->stop(); is($t->read_file('status.log'), "400\n", 'preread buffer full - log');
--- a/stream_ssl_realip.t Thu Nov 23 14:42:47 2017 +0300 +++ b/stream_ssl_realip.t Fri Nov 24 19:58:40 2017 +0300 @@ -101,7 +101,7 @@ or die "Can't create certificate for $name: $!\n"; } -$t->try_run('no stream proxy_protocol or inet6 support')->plan(6); +$t->try_run('no inet6 support')->plan(6); ###############################################################################
--- a/stream_ssl_variables.t Thu Nov 23 14:42:47 2017 +0300 +++ b/stream_ssl_variables.t Fri Nov 24 19:58:40 2017 +0300 @@ -90,7 +90,7 @@ or die "Can't create certificate for $name: $!\n"; } -$t->try_run('no stream return')->plan(5); +$t->run()->plan(5); ###############################################################################
--- a/stream_ssl_verify_client.t Thu Nov 23 14:42:47 2017 +0300 +++ b/stream_ssl_verify_client.t Fri Nov 24 19:58:40 2017 +0300 @@ -108,26 +108,14 @@ or die "Can't create certificate for $name: $!\n"; } -$t->try_run('no ssl_verify_client')->plan(10); +$t->run()->plan(10); ############################################################################### -TODO: { -todo_skip 'leaves coredump', 1 unless $t->has_version('1.11.9'); - is(stream('127.0.0.1:' . port(8080))->read(), ':', 'plain connection'); -} - -TODO: { -local $TODO = 'fails on one-pass ngx_ssl_handshake' - unless $t->has_version('1.11.9'); - is(get(8081), '', 'no cert'); is(get(8082, '1.example.com'), '', 'bad optional cert'); - -} - is(get(8082), 'NONE:', 'no optional cert'); like(get(8083, '1.example.com'), qr/FAILED.*BEGIN/, 'bad optional_no_ca cert'); @@ -143,15 +131,10 @@ } -TODO: { -local $TODO = 'not yet, see above' unless $t->has_version('1.11.9'); - $t->stop(); is($t->read_file('status.log'), "500\n200\n", 'log'); -} - ############################################################################### sub get {
--- a/stream_status_variable.t Thu Nov 23 14:42:47 2017 +0300 +++ b/stream_status_variable.t Fri Nov 24 19:58:40 2017 +0300 @@ -83,7 +83,7 @@ EOF -$t->try_run('no stream access_log')->plan(6); +$t->run()->plan(6); ###############################################################################
--- a/stream_udp_upstream.t Thu Nov 23 14:42:47 2017 +0300 +++ b/stream_udp_upstream.t Fri Nov 24 19:58:40 2017 +0300 @@ -88,7 +88,7 @@ $t->run_daemon(\&udp_daemon, port(8984), $t); $t->run_daemon(\&udp_daemon, port(8985), $t); -$t->try_run('no stream access_log')->plan(5); +$t->run()->plan(5); $t->waitforfile($t->testdir . '/' . port(8984)); $t->waitforfile($t->testdir . '/' . port(8985));
--- a/stream_upstream.t Thu Nov 23 14:42:47 2017 +0300 +++ b/stream_upstream.t Fri Nov 24 19:58:40 2017 +0300 @@ -89,7 +89,7 @@ $t->run_daemon(\&stream_daemon, port(8084)); $t->run_daemon(\&stream_daemon, port(8085)); -$t->try_run('no stream access_log')->plan(6); +$t->run()->plan(6); $t->waitforsocket('127.0.0.1:' . port(8084)); $t->waitforsocket('127.0.0.1:' . port(8085)); @@ -106,14 +106,9 @@ $t->run_daemon(\&stream_daemon, port(8086)); $t->waitforsocket('127.0.0.1:' . port(8086)); -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.8'); - sleep 2; # wait till fail_timeout passes is(parallel(30, port(8083)), "$port6: 30", 'recovery'); -} - $t->stop(); like($t->read_file('u.log'), qr/127.0.0.1:$port6, 127.0.0.1:$port4!0, 1!0, 4/,
--- a/stream_variables.t Thu Nov 23 14:42:47 2017 +0300 +++ b/stream_variables.t Fri Nov 24 19:58:40 2017 +0300 @@ -76,7 +76,7 @@ EOF -$t->try_run('no stream return or inet6 support')->plan(8); +$t->try_run('no inet6 support')->plan(8); ###############################################################################
--- a/sub_filter_slice.t Thu Nov 23 14:42:47 2017 +0300 +++ b/sub_filter_slice.t Fri Nov 24 19:58:40 2017 +0300 @@ -71,16 +71,11 @@ my $r; -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.5'); - # range filter in subrequests (subrequest_ranges) $r = get('/t', 'Range: bytes=2-4'); unlike($r, qr/\x0d\x0a?0\x0d\x0a?\x0d\x0a?\w/, 'only final chunk'); -} - TODO: { local $TODO = 'not yet';
--- a/upstream_hash.t Thu Nov 23 14:42:47 2017 +0300 +++ b/upstream_hash.t Fri Nov 24 19:58:40 2017 +0300 @@ -198,15 +198,9 @@ like(http_get('/busy'), qr/X-IP: 127.0.0.1:$p1, bad/, 'upstream name - busy'); - -TODO: { -local $TODO = 'not yet' unless $t->has_version('1.11.5'); - like(http_get('/cbusy'), qr/X-IP: 127.0.0.1:$p1, cbad/, 'upstream name - busy consistent'); -} - ############################################################################### # Returns true if two arrays follow consistency, i.e., they may only differ
--- a/upstream_max_conns.t Thu Nov 23 14:42:47 2017 +0300 +++ b/upstream_max_conns.t Fri Nov 24 19:58:40 2017 +0300 @@ -134,7 +134,7 @@ $t->run_daemon(\&http_daemon, port(8081), port(8082), port(8085)); -$t->try_run('no upstream max_conns')->plan(14); +$t->run()->plan(14); $t->waitforsocket('127.0.0.1:' . port(8081)); $t->waitforsocket('127.0.0.1:' . port(8082));
--- a/worker_shutdown_timeout.t Thu Nov 23 14:42:47 2017 +0300 +++ b/worker_shutdown_timeout.t Fri Nov 24 19:58:40 2017 +0300 @@ -48,7 +48,7 @@ EOF -$t->try_run('no worker_shutdown_timeout')->plan(1); +$t->run()->plan(1); ###############################################################################