changeset 89:abbe4b123795

Tests: simplify proxy-store tests.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 04 May 2009 23:04:20 +0400
parents a31296de1987
children 1d3c82227a05
files proxy-store.t
diffstat 1 files changed, 8 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/proxy-store.t
+++ b/proxy-store.t
@@ -43,16 +43,8 @@ http {
         listen       127.0.0.1:8080;
         server_name  localhost;
 
-        location /store {
-            proxy_pass http://127.0.0.1:8080/index.html;
-            proxy_store on;
-        }
-        location /nostore {
-            proxy_pass http://127.0.0.1:8080/index-nostore.html;
-            proxy_store on;
-        }
-        location /big {
-            proxy_pass http://127.0.0.1:8080/index-big.html;
+        location /store- {
+            proxy_pass http://127.0.0.1:8080/;
             proxy_store on;
         }
         location /index-nostore.html {
@@ -73,20 +65,21 @@ EOF
 
 ###############################################################################
 
-like(http_get('/store'), qr/SEE-THIS/, 'proxy request');
-ok(-e $t->testdir() . '/store', 'result stored');
+like(http_get('/store-index.html'), qr/SEE-THIS/, 'proxy request');
+ok(-e $t->testdir() . '/store-index.html', 'result stored');
 
-like(http_get('/nostore'), qr/SEE-THIS/, 'proxy request with x-accel-expires');
+like(http_get('/store-index-nostore.html'), qr/SEE-THIS/,
+	'proxy request with x-accel-expires');
 
 TODO: {
 local $TODO = 'patch under review';
 
-ok(!-e $t->testdir() . '/nostore', 'result not stored');
+ok(!-e $t->testdir() . '/store-index-nostore.html', 'result not stored');
 }
 
 ok(scalar @{[ glob $t->testdir() . '/proxy_temp/*' ]} == 0, 'no temp files');
 
-http_get('/big', aborted => 1, sleep => 0.1);
+http_get('/store-index-big.html', aborted => 1, sleep => 0.1);
 sleep(1);
 
 ok(scalar @{[ glob $t->testdir() . '/proxy_temp/*' ]} == 0,