Mercurial > hg > nginx-tests
comparison proxy_cache_revalidate.t @ 568:907e89fba9c3
Tests: removed TODO and try_run() checks for legacy versions.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Sun, 03 May 2015 12:45:09 +0300 |
parents | 679a7669ee71 |
children | 2cd00179f4b2 |
comparison
equal
deleted
inserted
replaced
567:22bade4c7e12 | 568:907e89fba9c3 |
---|---|
21 select STDERR; $| = 1; | 21 select STDERR; $| = 1; |
22 select STDOUT; $| = 1; | 22 select STDOUT; $| = 1; |
23 | 23 |
24 plan(skip_all => 'win32') if $^O eq 'MSWin32'; | 24 plan(skip_all => 'win32') if $^O eq 'MSWin32'; |
25 | 25 |
26 my $t = Test::Nginx->new()->has(qw/http proxy cache rewrite/) | 26 my $t = Test::Nginx->new()->has(qw/http proxy cache rewrite/)->plan(23) |
27 ->write_file_expand('nginx.conf', <<'EOF'); | 27 ->write_file_expand('nginx.conf', <<'EOF'); |
28 | 28 |
29 %%TEST_GLOBALS%% | 29 %%TEST_GLOBALS%% |
30 | 30 |
31 daemon off; | 31 daemon off; |
79 | 79 |
80 $t->write_file('t', 'SEE-THIS'); | 80 $t->write_file('t', 'SEE-THIS'); |
81 $t->write_file('t2', 'SEE-THIS'); | 81 $t->write_file('t2', 'SEE-THIS'); |
82 $t->write_file('t3', 'SEE-THIS'); | 82 $t->write_file('t3', 'SEE-THIS'); |
83 | 83 |
84 $t->run()->plan(23); | 84 $t->run(); |
85 | 85 |
86 ############################################################################### | 86 ############################################################################### |
87 | 87 |
88 # request documents and make sure they are cached | 88 # request documents and make sure they are cached |
89 | 89 |
129 | 129 |
130 # the same for etag: | 130 # the same for etag: |
131 # 1st document isn't modified | 131 # 1st document isn't modified |
132 # 2nd document is recreated | 132 # 2nd document is recreated |
133 | 133 |
134 TODO: { | |
135 local $TODO = 'not yet' unless $t->has_version('1.7.7'); | |
136 | |
137 like(http_get('/etag/t'), qr/X-Cache-Status: REVALIDATED.*SEE/ms, | 134 like(http_get('/etag/t'), qr/X-Cache-Status: REVALIDATED.*SEE/ms, |
138 'etag revalidated'); | 135 'etag revalidated'); |
139 | |
140 } | |
141 | |
142 like(http_get('/etag/t'), qr/X-Cache-Status: HIT.*SEE/ms, | 136 like(http_get('/etag/t'), qr/X-Cache-Status: HIT.*SEE/ms, |
143 'etag cached again'); | 137 'etag cached again'); |
144 like(http_get('/etag/t2'), qr/X-Cache-Status: EXPIRED.*NEW/ms, | 138 like(http_get('/etag/t2'), qr/X-Cache-Status: EXPIRED.*NEW/ms, |
145 'etag2 revalidate failed'); | 139 'etag2 revalidate failed'); |
146 like(http_get('/etag/t2'), qr/X-Cache-Status: HIT.*NEW/ms, | 140 like(http_get('/etag/t2'), qr/X-Cache-Status: HIT.*NEW/ms, |