Skip to content

Commit 9473f14

Browse files
committed
Tests: removed TODO and try_run() checks for legacy versions.
1 parent 33678e0 commit 9473f14

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+45
-289
lines changed

access_log_escape.t

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,7 @@ http_get('/?a="1 \\ ' . pack("n", 0x1b1c) . ' "&c=2');
5757

5858
$t->stop();
5959

60-
TODO: {
61-
local $TODO = 'not yet' unless $t->has_version('1.11.8');
62-
6360
is($t->read_file('json.log'), '\"1 \\\\ \u001B\u001C \"2' . "\n", 'json');
6461
is($t->read_file('test.log'), '\x221 \x5C \x1B\x1C \x22-2' . "\n", 'default');
6562

66-
}
67-
6863
###############################################################################

addition_buffered.t

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@ $t->run();
6262

6363
# if data is buffered, there should be no interleaved data in output
6464

65-
TODO: {
66-
local $TODO = 'not yet' unless $t->has_version('1.11.5');
67-
6865
like(http_get('/proxy/body.html'), qr/^XXXXXafter$/m, 'request');
6966

70-
}
71-
7267
###############################################################################

auth_basic.t

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,8 @@ like(http_get_auth('/', 'crypt2', '1'), qr!401 Unauthorized!,
9595

9696
like(http_get_auth('/', 'apr1', 'password'), qr!SEETHIS!, 'apr1 md5');
9797
like(http_get_auth('/', 'plain', 'password'), qr!SEETHIS!, 'plain password');
98-
99-
SKIP: {
100-
# SHA1 may not be available unless we have OpenSSL
101-
102-
skip 'no sha1', 2 unless $t->has_module('--with-http_ssl_module')
103-
or $t->has_module('--with-sha1')
104-
or $t->has_module('--with-openssl');
105-
106-
like(http_get_auth('/', 'ssha', 'password'), qr!SEETHIS!, 'ssha');
107-
like(http_get_auth('/', 'sha', 'password'), qr!SEETHIS!, 'sha');
108-
}
98+
like(http_get_auth('/', 'ssha', 'password'), qr!SEETHIS!, 'ssha');
99+
like(http_get_auth('/', 'sha', 'password'), qr!SEETHIS!, 'sha');
109100

110101
unlike(http_get_auth('/', 'apr1', '123'), qr!SEETHIS!, 'apr1 md5 wrong');
111102
unlike(http_get_auth('/', 'plain', '123'), qr!SEETHIS!, 'plain wrong');

config_dump.t

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,10 @@ like($dump, qr!^# configuration file $d/inc.conf:$!m, 'inc.conf found');
7777
like($dump, qr!^# configuration file $d/inc2.conf:$!m, 'inc2.conf found');
7878
like($dump, qr!^# configuration file $d/map.conf:$!m, 'map.conf found');
7979

80-
TODO: {
81-
local $TODO = 'not yet' unless $t->has_version('1.11.6');
82-
8380
unlike($dump, qr!(# configuration file $d/inc.conf:).*\1!s, 'inc.conf uniq');
8481
unlike($dump, qr!(# configuration file $d/inc2.conf:).*\1!s, 'inc2.conf uniq');
8582
unlike($dump, qr!(# configuration file $d/map.conf:).*\1!s, 'map.conf uniq');
8683

87-
}
88-
8984
is(getconf($t, $dump, 'nginx.conf'), $t->read_file('nginx.conf'), 'content');
9085
is(getconf($t, $dump, 'inc.conf'), $t->read_file('inc.conf'), 'content inc');
9186
is(getconf($t, $dump, 'map.conf'), $t->read_file('map.conf'), 'content inc 2');

geo.t

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -210,15 +210,9 @@ like($r, qr/^X-Del: world/m, 'geo delete');
210210
like($r, qr/^X-Ran: loopback/m, 'geo ranges');
211211
like($r, qr/^X-RIn: loopback/m, 'geo ranges include');
212212

213-
TODO: {
214-
todo_skip 'use-after-free', 2 unless $ENV{TEST_NGINX_UNSAFE}
215-
or $t->has_version('1.11.4');
216-
217213
like(http_get('/2'), qr/^X-RDe: default/m, 'geo ranges delete');
218214
like(http_get('/2'), qr/^X-RD2: default/m, 'geo ranges delete 2');
219215

220-
}
221-
222216
like($r, qr/^X-ABe: loopback/m, 'geo ranges add before');
223217
like($r, qr/^X-AAf: loopback/m, 'geo ranges add after');
224218
like($r, qr/^X-Ins: loopback/m, 'geo ranges insert');
@@ -229,16 +223,9 @@ like(http_get('/1?ip=192.0.2.1'), qr/^X-Arg: test/m, 'geo from variable');
229223
like(http_get('/1?ip=10.0.0.1'), qr/^X-Arg: default/m, 'geo default');
230224
like(http_get('/1?ip=10.0.0.1'), qr/^X-ARa: default/m, 'geo ranges default');
231225
like(http_get('/1?ip=10.13.2.1'), qr/^X-ARa: foo2/m, 'geo ranges add');
232-
233-
TODO: {
234-
todo_skip 'use-after-free', 1 unless $ENV{TEST_NGINX_UNSAFE}
235-
or $t->has_version('1.11.4');
236-
237226
like(http_get('/1?ip=10.11.2.1'), qr/^X-ARa: default/m,
238227
'geo delete range from variable');
239228

240-
}
241-
242229
like(http_xff('192.0.2.1'), qr/^X-XFF: test/m, 'geo proxy');
243230
like(http_xff('10.0.0.1'), qr/^X-XFF: default/m, 'geo proxy default');
244231
like(http_xff('10.0.0.1, 192.0.2.1'), qr/^X-XFF: test/m, 'geo proxy long');

h2.t

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,9 +1117,6 @@ undef $grace4;
11171117

11181118
# GOAWAY without awaiting active streams, further streams ignored
11191119

1120-
TODO: {
1121-
local $TODO = 'not yet' unless $t->has_version('1.11.6');
1122-
11231120
$s = Test::Nginx::HTTP2->new(port(8080));
11241121
$sid = $s->new_stream({ path => '/t1.html' });
11251122
$s->read(all => [{ sid => $sid, length => 2**16 - 1 }]);
@@ -1137,8 +1134,6 @@ $frames = $s->read(all => [{ sid => $sid2, fin => 0x4 }], wait => 0.5);
11371134
($frame) = grep { $_->{type} eq 'HEADERS' } @$frames;
11381135
is($frame, undef, 'GOAWAY with active stream - no new stream');
11391136

1140-
}
1141-
11421137
$s->h2_window(100, $sid);
11431138
$s->h2_window(100);
11441139
$frames = $s->read(all => [{ sid => $sid, fin => 0x1 }]);

h2_auth_request.t

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ $t->run();
7272

7373
my ($s, $sid, $frames, $frame);
7474

75-
TODO: {
76-
todo_skip 'use-after-free', 2 unless $ENV{TEST_NGINX_UNSAFE}
77-
or $t->has_version('1.11.7');
78-
7975
# second stream is used to induce body corruption issue
8076

8177
$s = Test::Nginx::HTTP2->new();
@@ -87,6 +83,4 @@ $frames = $s->read(all => [{ sid => $sid, fin => 1 }]);
8783
is($frame->{headers}->{'x-body'}, 'A' x 600, 'auth request body');
8884
isnt($frame->{headers}->{'x-body-file'}, undef, 'auth request body file');
8985

90-
}
91-
9286
###############################################################################

h2_fastcgi_request_buffering.t

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,13 @@ http {
5353
EOF
5454

5555
$t->run();
56-
57-
my $f = get_body('/chunked');
58-
plan(skip_all => 'no unbuffered request body') unless $f;
59-
$f->{http_end}();
60-
6156
$t->plan(48);
6257

6358
###############################################################################
6459

6560
# unbuffered request body to fastcgi
6661

67-
$f = get_body('/');
62+
my $f = get_body('/');
6863
ok($f->{headers}, 'request');
6964
is($f->{upload}('01234', body_more => 1), '01234', 'part');
7065
is($f->{upload}('56789'), '56789_eos', 'part 2');

h2_max_requests.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ http {
4949
EOF
5050

5151
$t->write_file('index.html', '');
52-
$t->try_run('no http2_max_requests')->plan(5);
52+
$t->run()->plan(5);
5353

5454
###############################################################################
5555

h2_proxy_request_buffering.t

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,13 @@ http {
6666
EOF
6767

6868
$t->run();
69-
70-
my $f = get_body('/chunked');
71-
plan(skip_all => 'no unbuffered request body') unless $f;
72-
$f->{http_end}();
73-
7469
$t->plan(49);
7570

7671
###############################################################################
7772

7873
# unbuffered request body
7974

80-
$f = get_body('/', 'content-length' => 10);
75+
my $f = get_body('/', 'content-length' => 10);
8176
ok($f->{headers}, 'request');
8277
is($f->{upload}('01234', body_more => 1), '01234', 'part');
8378
is($f->{upload}('56789'), '56789', 'part 2');

0 commit comments

Comments
 (0)