Mercurial > hg > nginx-tests
comparison proxy_cache_vary.t @ 1693:5ac6efbe5552
Tests: removed TODO and try_run() checks for legacy versions.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 01 Jun 2021 16:40:18 +0300 |
parents | feb754918372 |
children | ce4419d32383 |
comparison
equal
deleted
inserted
replaced
1692:f6795e2e6a4b | 1693:5ac6efbe5552 |
---|---|
260 # before 1.19.3, this prevented updating c->body_start of a main key | 260 # before 1.19.3, this prevented updating c->body_start of a main key |
261 # triggering "cache file .. has too long header" critical errors | 261 # triggering "cache file .. has too long header" critical errors |
262 | 262 |
263 get1('/cold?vary=z', 'z:1'); | 263 get1('/cold?vary=z', 'z:1'); |
264 like(get1('/cold?vary=x,y', 'x:1'), qr/MISS/, 'change first'); | 264 like(get1('/cold?vary=x,y', 'x:1'), qr/MISS/, 'change first'); |
265 | |
266 TODO: { | |
267 local $TODO = 'not yet' unless $t->has_version('1.19.3'); | |
268 | |
269 like(get1('/cold?vary=x,y', 'x:1'), qr/HIT/, 'change first cached'); | 265 like(get1('/cold?vary=x,y', 'x:1'), qr/HIT/, 'change first cached'); |
270 | |
271 } | |
272 | 266 |
273 like(get1('/cold?vary=x,y&xtra=1', 'x:2'), qr/MISS/, 'change second'); | 267 like(get1('/cold?vary=x,y&xtra=1', 'x:2'), qr/MISS/, 'change second'); |
274 like(get1('/cold?vary=x,y&xtra=1', 'x:2'), qr/HIT/, 'change second cached'); | 268 like(get1('/cold?vary=x,y&xtra=1', 'x:2'), qr/HIT/, 'change second cached'); |
275 | 269 |
276 $t->stop(); | 270 $t->stop(); |
280 | 274 |
281 # before 1.19.3, it was loaded using a variant stored with a main key | 275 # before 1.19.3, it was loaded using a variant stored with a main key |
282 # triggering "cache file .. has too long header" critical errors | 276 # triggering "cache file .. has too long header" critical errors |
283 | 277 |
284 like(get1('/cold?vary=x,y', 'x:1'), qr/HIT/, 'cold first'); | 278 like(get1('/cold?vary=x,y', 'x:1'), qr/HIT/, 'cold first'); |
285 | |
286 TODO: { | |
287 local $TODO = 'not yet' unless $t->has_version('1.19.3'); | |
288 | |
289 like(get1('/cold?vary=x,y&xtra=1', 'x:2'), qr/HIT/, 'cold second'); | 279 like(get1('/cold?vary=x,y&xtra=1', 'x:2'), qr/HIT/, 'cold second'); |
290 | 280 |
291 } | |
292 | |
293 $t->stop(); | 281 $t->stop(); |
294 | 282 |
295 TODO: { | |
296 local $TODO = 'not yet' unless $t->has_version('1.19.3'); | |
297 | |
298 like(`grep -F '[crit]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no crit'); | 283 like(`grep -F '[crit]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no crit'); |
299 | |
300 } | |
301 | 284 |
302 ############################################################################### | 285 ############################################################################### |
303 | 286 |
304 sub get { | 287 sub get { |
305 my ($url, $extra) = @_; | 288 my ($url, $extra) = @_; |