Mercurial > hg > nginx-tests
comparison proxy_cache_use_stale.t @ 1251:766bcbb632ee
Tests: removed TODO and try_run() checks for legacy versions.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 24 Nov 2017 19:58:40 +0300 |
parents | a3d23d16712d |
children | fc43a3555095 |
comparison
equal
deleted
inserted
replaced
1250:b708848eb49a | 1251:766bcbb632ee |
---|---|
133 $t->write_file('t6.html', 'SEE-THIS'); | 133 $t->write_file('t6.html', 'SEE-THIS'); |
134 $t->write_file('t7.html', 'SEE-THIS' x 1024); | 134 $t->write_file('t7.html', 'SEE-THIS' x 1024); |
135 $t->write_file('t9.html', 'SEE-THIS' x 1024); | 135 $t->write_file('t9.html', 'SEE-THIS' x 1024); |
136 $t->write_file('ssi.html', 'xxx <!--#include virtual="/t9.html" --> xxx'); | 136 $t->write_file('ssi.html', 'xxx <!--#include virtual="/t9.html" --> xxx'); |
137 | 137 |
138 $t->try_run('no proxy_cache_background_update')->plan(29); | 138 $t->run()->plan(29); |
139 | 139 |
140 ############################################################################### | 140 ############################################################################### |
141 | 141 |
142 like(get('/t.html', 'max-age=1, stale-if-error=5'), qr/MISS/, 'stale-if-error'); | 142 like(get('/t.html', 'max-age=1, stale-if-error=5'), qr/MISS/, 'stale-if-error'); |
143 like(http_get('/t.html?e=1'), qr/HIT/, 's-i-e - cached'); | 143 like(http_get('/t.html?e=1'), qr/HIT/, 's-i-e - cached'); |
232 | 232 |
233 # due to the missing content_handler inheritance in a cloned subrequest, | 233 # due to the missing content_handler inheritance in a cloned subrequest, |
234 # this used to access a static file in the update request | 234 # this used to access a static file in the update request |
235 | 235 |
236 like(http_get('/t2.html?if=1'), qr/STALE/, 'background update in if'); | 236 like(http_get('/t2.html?if=1'), qr/STALE/, 'background update in if'); |
237 | |
238 TODO: { | |
239 local $TODO = 'not yet' unless $t->has_version('1.11.11'); | |
240 | |
241 like(http_get('/t2.html?if=1'), qr/HIT/, 'background update in if - updated'); | 237 like(http_get('/t2.html?if=1'), qr/HIT/, 'background update in if - updated'); |
242 | |
243 } | |
244 | 238 |
245 ############################################################################### | 239 ############################################################################### |
246 | 240 |
247 sub get { | 241 sub get { |
248 my ($url, $extra, %extra) = @_; | 242 my ($url, $extra, %extra) = @_; |