Mercurial > hg > nginx-tests
comparison limit_req_delay.t @ 1535:144c6ce732e4
Tests: removed TODO and try_run() checks for legacy versions.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Mon, 02 Dec 2019 14:56:37 +0300 |
parents | d22717fcabdb |
children |
comparison
equal
deleted
inserted
replaced
1534:96fb3513345b | 1535:144c6ce732e4 |
---|---|
20 ############################################################################### | 20 ############################################################################### |
21 | 21 |
22 select STDERR; $| = 1; | 22 select STDERR; $| = 1; |
23 select STDOUT; $| = 1; | 23 select STDOUT; $| = 1; |
24 | 24 |
25 my $t = Test::Nginx->new()->has(qw/http limit_req/); | 25 my $t = Test::Nginx->new()->has(qw/http limit_req/)->plan(4); |
26 | 26 |
27 $t->write_file_expand('nginx.conf', <<'EOF'); | 27 $t->write_file_expand('nginx.conf', <<'EOF'); |
28 | 28 |
29 %%TEST_GLOBALS%% | 29 %%TEST_GLOBALS%% |
30 | 30 |
50 } | 50 } |
51 | 51 |
52 EOF | 52 EOF |
53 | 53 |
54 $t->write_file('delay.html', 'XtestX'); | 54 $t->write_file('delay.html', 'XtestX'); |
55 $t->try_run('no limit_req delay')->plan(4); | 55 $t->run(); |
56 | 56 |
57 ############################################################################### | 57 ############################################################################### |
58 | 58 |
59 like(http_get('/delay.html'), qr/^HTTP\/1.. 200 /m, 'request'); | 59 like(http_get('/delay.html'), qr/^HTTP\/1.. 200 /m, 'request'); |
60 like(http_get('/delay.html'), qr/X-Time: 0.000/, 'not yet delayed'); | 60 like(http_get('/delay.html'), qr/X-Time: 0.000/, 'not yet delayed'); |