changeset 80:14cf2658592d

Tests: add more proxy_cache tests, remove obsolete clean_time.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 06 Apr 2009 04:48:51 +0400
parents d5330d926fac
children 6d93f3a4ce48
files proxy-cache.t
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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');
+
 ###############################################################################