stas 2004/09/22 18:44:11
Modified: t/hooks .cvsignore trans.t t/user .cvsignore t/hooks/TestHooks init.pm trans.pm t/modules proxy.t t/response/TestModules proxy.pm t/response/TestUser rewrite.pm Added: t/hooks init.t t/user rewrite.t Log: move tests with trans and init handler into their own vhosts, so that they don't intervene with debugging of other tests Revision Changes Path 1.7 +0 -2 modperl-2.0/t/hooks/.cvsignore Index: .cvsignore =================================================================== RCS file: /home/cvs/modperl-2.0/t/hooks/.cvsignore,v retrieving revision 1.6 retrieving revision 1.7 diff -u -u -r1.6 -r1.7 --- .cvsignore 22 Feb 2004 04:07:35 -0000 1.6 +++ .cvsignore 23 Sep 2004 01:44:10 -0000 1.7 @@ -3,8 +3,6 @@ authen.t authz.t fixup.t -trans.t -init.t push_handlers_same_phase.t push_handlers_blessed.t set_handlers.t 1.5 +11 -6 modperl-2.0/t/hooks/trans.t Index: trans.t =================================================================== RCS file: /home/cvs/modperl-2.0/t/hooks/trans.t,v retrieving revision 1.4 retrieving revision 1.5 diff -u -u -r1.4 -r1.5 --- trans.t 1 Apr 2003 04:39:30 -0000 1.4 +++ trans.t 23 Sep 2004 01:44:10 -0000 1.5 @@ -8,15 +8,20 @@ use Apache2 (); use Apache::Const ':common'; +my $module = 'TestHooks::trans'; +Apache::TestRequest::module($module); +my $path = Apache::TestRequest::module2path($module); +my $config = Apache::Test::config(); +my $hostport = Apache::TestRequest::hostport($config); +t_debug("connecting to $hostport"); + plan tests => 3; t_client_log_error_is_expected(); -ok GET_RC('/nope') == NOT_FOUND; - -my $module = '/TestHooks/trans.pm'; +ok t_cmp GET_RC("http://$hostport/nope"), NOT_FOUND; -my $body = GET_BODY $module; +my $body = GET_BODY "http://$hostport/TestHooks/trans.pm"; -ok $body =~ /package TestHooks::trans/; +ok $body =~ /package $module/; -ok GET_OK '/phooey'; +ok GET_OK "http://$hostport/phooey"; 1.1 modperl-2.0/t/hooks/init.t Index: init.t =================================================================== use strict; use warnings FATAL => 'all'; use Apache::TestRequest qw(GET_BODY_ASSERT); use Apache::Test; use Apache::TestUtil; my $module = 'TestHooks::init'; Apache::TestRequest::module($module); my $path = Apache::TestRequest::module2path($module); my $config = Apache::Test::config(); my $hostport = Apache::TestRequest::hostport($config); t_debug("connecting to $hostport"); print GET_BODY_ASSERT "http://$hostport/$path"; 1.2 +1 -1 modperl-2.0/t/user/.cvsignore Index: .cvsignore =================================================================== RCS file: /home/cvs/modperl-2.0/t/user/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -u -r1.1 -r1.2 --- .cvsignore 18 Apr 2004 01:31:21 -0000 1.1 +++ .cvsignore 23 Sep 2004 01:44:10 -0000 1.2 @@ -1,2 +1,2 @@ -rewrite.t + 1.1 modperl-2.0/t/user/rewrite.t Index: rewrite.t =================================================================== use strict; use warnings FATAL => 'all'; use Apache::TestRequest qw(GET_BODY_ASSERT); use Apache::Test; use Apache::TestUtil; my $module = 'TestUser::rewrite'; Apache::TestRequest::module($module); my $path = Apache::TestRequest::module2path($module); my $config = Apache::Test::config(); my $hostport = Apache::TestRequest::hostport($config); t_debug("connecting to $hostport"); print GET_BODY_ASSERT "http://$hostport/$path"; 1.6 +10 -6 modperl-2.0/t/hooks/TestHooks/init.pm Index: init.pm =================================================================== RCS file: /home/cvs/modperl-2.0/t/hooks/TestHooks/init.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -u -r1.5 -r1.6 --- init.pm 11 Aug 2003 20:34:22 -0000 1.5 +++ init.pm 23 Sep 2004 01:44:10 -0000 1.6 @@ -54,11 +54,15 @@ 1; __DATA__ -PerlInitHandler TestHooks::init::second -<Base> +<NoAutoConfig> + <VirtualHost TestHooks::init> PerlModule TestHooks::init PerlInitHandler TestHooks::init::first -</Base> -PerlResponseHandler TestHooks::init -PerlResponseHandler TestHooks::init::response -SetHandler modperl + <Location /TestHooks__init> + PerlInitHandler TestHooks::init::second + PerlResponseHandler TestHooks::init + PerlResponseHandler TestHooks::init::response + SetHandler modperl + </Location> + </VirtualHost> +</NoAutoConfig> 1.6 +9 -2 modperl-2.0/t/hooks/TestHooks/trans.pm Index: trans.pm =================================================================== RCS file: /home/cvs/modperl-2.0/t/hooks/TestHooks/trans.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -u -r1.5 -r1.6 --- trans.pm 18 Apr 2003 06:18:58 -0000 1.5 +++ trans.pm 23 Sep 2004 01:44:11 -0000 1.6 @@ -37,5 +37,12 @@ 1; __DATA__ -PerlResponseHandler Apache::TestHandler::ok1 -SetHandler modperl +<NoAutoConfig> + <VirtualHost TestHooks::trans> + PerlTransHandler TestHooks::trans + <Location /TestHooks__trans> + PerlResponseHandler Apache::TestHandler::ok1 + SetHandler modperl + </Location> + </VirtualHost> +</NoAutoConfig> 1.5 +8 -3 modperl-2.0/t/modules/proxy.t Index: proxy.t =================================================================== RCS file: /home/cvs/modperl-2.0/t/modules/proxy.t,v retrieving revision 1.4 retrieving revision 1.5 diff -u -u -r1.4 -r1.5 --- proxy.t 3 Aug 2004 16:16:22 -0000 1.4 +++ proxy.t 23 Sep 2004 01:44:11 -0000 1.5 @@ -3,14 +3,19 @@ use Apache::Test; use Apache::TestUtil; - use Apache::TestRequest; -my $location = "/TestModules__proxy"; +my $module = 'TestModules::proxy'; + +Apache::TestRequest::module($module); +my $path = Apache::TestRequest::module2path($module); +my $config = Apache::Test::config(); +my $hostport = Apache::TestRequest::hostport($config); +t_debug("connecting to $hostport"); plan tests => 1, (need_module('proxy') && need_access); my $expected = "ok"; -my $received = GET_BODY_ASSERT $location; +my $received = GET_BODY_ASSERT "http://$hostport/$path";; ok t_cmp($received, $expected, "internally proxified request"); 1.6 +2 -0 modperl-2.0/t/response/TestModules/proxy.pm Index: proxy.pm =================================================================== RCS file: /home/cvs/modperl-2.0/t/response/TestModules/proxy.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -u -r1.5 -r1.6 --- proxy.pm 9 Jul 2004 08:01:21 -0000 1.5 +++ proxy.pm 23 Sep 2004 01:44:11 -0000 1.6 @@ -43,6 +43,7 @@ 1; __END__ <NoAutoConfig> + <VirtualHost TestModules::proxy> <IfModule mod_proxy.c> <Proxy http://@servername@:@port@/*> <IfModule @ACCESS_MODULE@> @@ -59,5 +60,6 @@ PerlResponseHandler TestModules::proxy::response </Location> </IfModule> + </VirtualHost> </NoAutoConfig> 1.3 +2 -0 modperl-2.0/t/response/TestUser/rewrite.pm Index: rewrite.pm =================================================================== RCS file: /home/cvs/modperl-2.0/t/response/TestUser/rewrite.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -u -r1.2 -r1.3 --- rewrite.pm 9 Jul 2004 21:52:49 -0000 1.2 +++ rewrite.pm 23 Sep 2004 01:44:11 -0000 1.3 @@ -62,6 +62,7 @@ 1; __END__ <NoAutoConfig> + <VirtualHost TestUser::rewrite> PerlModule TestUser::rewrite PerlTransHandler TestUser::rewrite::trans PerlMapToStorageHandler TestUser::rewrite::map2storage @@ -69,5 +70,6 @@ SetHandler modperl PerlResponseHandler TestUser::rewrite::response </Location> + </VirtualHost> </NoAutoConfig>