You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-cvs@httpd.apache.org by co...@apache.org on 2005/09/27 12:56:08 UTC

svn commit: r291899 - in /httpd/test/trunk/perl-framework/t: conf/cache.conf.in modules/cache.t

Author: colm
Date: Tue Sep 27 03:55:56 2005
New Revision: 291899

URL: http://svn.apache.org/viewcvs?rev=291899&view=rev
Log:
Add a a test for mod_cache and mod_dir brokenness.

Added:
    httpd/test/trunk/perl-framework/t/conf/cache.conf.in   (with props)
    httpd/test/trunk/perl-framework/t/modules/cache.t   (with props)

Added: httpd/test/trunk/perl-framework/t/conf/cache.conf.in
URL: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/t/conf/cache.conf.in?rev=291899&view=auto
==============================================================================
--- httpd/test/trunk/perl-framework/t/conf/cache.conf.in (added)
+++ httpd/test/trunk/perl-framework/t/conf/cache.conf.in Tue Sep 27 03:55:56 2005
@@ -0,0 +1,17 @@
+#
+# Config for mod_cache tests
+#
+
+<IfModule mod_cache.c>
+    <IfModule mod_disk_cache.c>
+
+        <VirtualHost mod_cache>
+            CacheEnable    disk /cache/
+            CacheRoot      @SERVERROOT@/conf/cacheroot/ 
+            CacheDirLevels 1
+            CacheDirLength 1
+
+            DocumentRoot @SERVERROOT@/htdocs/modules/cache
+        </VirtualHost>
+   </IfModule>
+</IfModule>

Propchange: httpd/test/trunk/perl-framework/t/conf/cache.conf.in
------------------------------------------------------------------------------
    svn:eol-style = native

Added: httpd/test/trunk/perl-framework/t/modules/cache.t
URL: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/t/modules/cache.t?rev=291899&view=auto
==============================================================================
--- httpd/test/trunk/perl-framework/t/modules/cache.t (added)
+++ httpd/test/trunk/perl-framework/t/modules/cache.t Tue Sep 27 03:55:56 2005
@@ -0,0 +1,22 @@
+use strict;
+use warnings FATAL => 'all';
+
+use Apache::Test;
+use Apache::TestRequest;
+use Apache::TestUtil;
+use Apache::TestConfig ();
+
+plan tests => 3, need 'cache', 'disk_cache', need_min_apache_version('2.3.0');
+
+Apache::TestRequest::module('mod_cache');
+
+t_mkdir(Apache::Test::vars('serverroot') . '/conf/cacheroot/');
+
+my $r = GET("/cache/");
+ok t_cmp($r->code, 200, "non-cached call to index.html");
+
+$r = GET("/cache/index.html");
+ok t_cmp($r->code, 200, "call to cache index.html");
+
+$r = GET("/cache/");
+ok t_cmp($r->code, 200, "cached call to index.html");

Propchange: httpd/test/trunk/perl-framework/t/modules/cache.t
------------------------------------------------------------------------------
    svn:eol-style = native