On Sunday 18 September 2005 10:11 pm, Geoffrey Young wrote:
> the only thing that jumps out at me is that t/00Startup.t is being executed
> in perl-space outside of the apache server. that is, 'make test' is doing
> the same thing as if you ran
>
> $ perl t/00Startup.t
>
> which probably isn't what you want.
Indeed.
> the utility of the test you've setup aside,
The test is very cut down, I was trying to track the issue by reducing my test
code to the minimum. The full test file is somewhat larger when I uncomment
the rest of the tests.
> you probably want to place that code inside
> t/response/TestStartup/01server.pm
> so that the test runs within the perl running within httpd.
Well, that helped.
> there's stuff about this in the Apache-Test docs I'm sure,
The docs are not clear, at least to me at this point. Your presentation is
more helpful, but I'm working from the slides and what I remember, which is
probably missing some important detail.
I'm getting closer though, I think.
If I have the voodoo right:
test file goes in t/response/TestStartup/00startup.pm
creates t/startup/00startup.t
and a block in httpd.conf so:
<Location /TestStartup__00startup>
SetHandler modperl
PerlResponseHandler TestStartup::00startup
</Location>
however "make test" (or "t/TEST") fails because it can't find
TestStartup/00startup.pm as it's only got "t/" in the path, not "t/response".
What did I miss?
t/response/TestStartup/00startup.pm:
-----------------------------
package TestStartup::00startup;
use Apache::Test qw(-withtestmore);
use Apache2::Const -compile => qw(OK);
sub handler
{
my $r = shift;
plan $r, tests => 2;
{
use_ok( 'Apache2::ServerUtil' );
}
{
can_ok( 'Apache2::ServerUtil', 'server' );
}
return Apache2::Const::OK;
}
1;
-----------------------------
--
"I thought the apt-get faerie just creates [applications] out of thin air..."
- flacco, slashdot.org 9/2/05