# HG changeset patch # User Maxim Dounin # Date 1238978931 -14400 # Node ID 14cf2658592d070ce46cca9f0ca09c7c9ae76ebf # Parent d5330d926faca8a0cd7c3b4f97641ed89af9c5a5 Tests: add more proxy_cache tests, remove obsolete clean_time. diff --git a/proxy-cache.t b/proxy-cache.t --- a/proxy-cache.t +++ b/proxy-cache.t @@ -9,7 +9,7 @@ use warnings; use strict; -use Test::More tests => 2; +use Test::More tests => 5; BEGIN { use FindBin; chdir($FindBin::Bin); } @@ -40,8 +40,7 @@ http { proxy_temp_path %%TESTDIR%%/proxy_temp; proxy_cache_path %%TESTDIR%%/cache levels=1:2 - keys_zone=NAME:10m - inactive=5m clean_time=2h00m; + keys_zone=NAME:10m; server { listen 127.0.0.1:8080; @@ -73,6 +72,7 @@ http { EOF $t->write_file('t.html', 'SEE-THIS'); +$t->write_file('t2.html', 'SEE-THIS'); $t->run(); ############################################################################### @@ -82,4 +82,8 @@ like(http_get('/t.html'), qr/SEE-THIS/, $t->write_file('t.html', 'NOOP'); like(http_get('/t.html'), qr/SEE-THIS/, 'proxy request cached'); +unlike(http_head('/t2.html'), qr/SEE-THIS/, 'head request'); +like(http_get('/t2.html'), qr/SEE-THIS/, 'get after head'); +unlike(http_head('/t2.html'), qr/SEE-THIS/, 'head after get'); + ###############################################################################