changeset 90:1d3c82227a05

Tests: subrequests with proxy_store todo test.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 05 May 2009 00:56:35 +0400
parents abbe4b123795
children ec89d4d65bef 9ab3762332b9
files proxy-store.t
diffstat 1 files changed, 19 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/proxy-store.t
+++ b/proxy-store.t
@@ -9,7 +9,7 @@
 use warnings;
 use strict;
 
-use Test::More tests => 6;
+use Test::More tests => 7;
 
 BEGIN { use FindBin; chdir($FindBin::Bin); }
 
@@ -47,6 +47,9 @@ http {
             proxy_pass http://127.0.0.1:8080/;
             proxy_store on;
         }
+        location /ssi.html {
+            ssi on;
+        }
         location /index-nostore.html {
             add_header  X-Accel-Expires  0;
         }
@@ -61,6 +64,10 @@ EOF
 $t->write_file('index.html', 'SEE-THIS');
 $t->write_file('index-nostore.html', 'SEE-THIS');
 $t->write_file('index-big.html', 'x' x (100 << 10));
+$t->write_file('ssi.html',
+	'<!--#include virtual="/store-index-big.html?1" -->' .
+	'<!--#include virtual="/store-index-big.html?2" -->'
+);
 $t->run();
 
 ###############################################################################
@@ -85,4 +92,15 @@ sleep(1);
 ok(scalar @{[ glob $t->testdir() . '/proxy_temp/*' ]} == 0,
 	'no temp files after aborted request');
 
+TODO: {
+local $TODO = 'not fixed yet';
+
+http_get('/ssi.html', aborted => 1, sleep => 0.1);
+sleep(1);
+
+ok(scalar @{[ glob $t->testdir() . '/proxy_temp/*' ]} == 0,
+	'no temp files after aborted ssi');
+
+}
+
 ###############################################################################