Mercurial > hg > nginx-tests
comparison proxy_cache.t @ 593:6c0a5903d0ae
Tests: cleanup now duplicating tests for no alerts.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 27 May 2015 17:09:22 +0300 |
parents | a9569f57da98 |
children | 94033cdc2f78 |
comparison
equal
deleted
inserted
replaced
592:355f2d5ff60f | 593:6c0a5903d0ae |
---|---|
19 ############################################################################### | 19 ############################################################################### |
20 | 20 |
21 select STDERR; $| = 1; | 21 select STDERR; $| = 1; |
22 select STDOUT; $| = 1; | 22 select STDOUT; $| = 1; |
23 | 23 |
24 my $t = Test::Nginx->new()->has(qw/http proxy cache gzip shmem/)->plan(14) | 24 my $t = Test::Nginx->new()->has(qw/http proxy cache gzip shmem/)->plan(13) |
25 ->write_file_expand('nginx.conf', <<'EOF'); | 25 ->write_file_expand('nginx.conf', <<'EOF'); |
26 | 26 |
27 %%TEST_GLOBALS%% | 27 %%TEST_GLOBALS%% |
28 | 28 |
29 daemon off; | 29 daemon off; |
108 unlink $t->testdir() . '/empty.html'; | 108 unlink $t->testdir() . '/empty.html'; |
109 like(http_gzip_request('/empty.html'), | 109 like(http_gzip_request('/empty.html'), |
110 qr/HTTP.*14\x0d\x0a.{20}\x0d\x0a0\x0d\x0a\x0d\x0a\z/s, | 110 qr/HTTP.*14\x0d\x0a.{20}\x0d\x0a0\x0d\x0a\x0d\x0a\z/s, |
111 'empty get stale'); | 111 'empty get stale'); |
112 | 112 |
113 like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts'); | |
114 | |
115 ############################################################################### | 113 ############################################################################### |
116 | 114 |
117 sub http_get_range { | 115 sub http_get_range { |
118 my ($url, $extra) = @_; | 116 my ($url, $extra) = @_; |
119 return http(<<EOF); | 117 return http(<<EOF); |