httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William McKee <>
Subject Perl test framework, TestConfig, and debugging A::T
Date Thu, 08 Jan 2004 11:49:35 GMT
Hi all,

I'm still working on getting my test environment in place using
Apache::Test. Recently, I added a vhost section to my
file. The test servers fire up as I would expect on ports 8529 and 8530
when I run `t/TEST -start`.  However, following the instructions on the testing page[1], I am unable to retrieve the port number
of the second server.

I looked into the source of Apache::TestRequest and can see where the
hostport function is trying to search $config->{vhosts} to get the
hostport for the module in question. I dumped $config and my vhosts key
contains an empty hashref :(.

After a bit of thinking, I realized that my VirtualHost directives are
being included from another file as follows:

	<VirtualHost securehost>
		include /home/quicktel/QT-Web/conf/quicktel-ssl.conf

Putting the contents of the include file directly into the didn't work either. However, while testing these
variations, instead of stopping and restarting the server, I started to
have each test independently startup the server so that my changes to would get parsed and loaded by the Apache test server.
While doing so, I noticed that the vhosts hash on the $config object is
populated. It doesn't matter whether the VirtualHost is inside of an
include or not.

So now I'm wondering if there is any way to get the vhost info without
having fire up a new server on every test. I can see where that info
would get "lost" when running the servers separately from the tests. Is
there anyway to reparse the config files using Apache::TestConfig to
gather that port number again or must I manually parse the extra.conf
file which contains the assigned port number for my vhost?

While tracking down the problem, I used the perl debugger to try to find
where Apache::Config was going astray but kept getting to the exec $cmd
at line 570 of Apache::TestRun which fires off a command that I can't
follow using the debugger. Is there another way to debug Apache::Test?
Can I set an environment variable that will prevent this second
execution of the TEST script?



Knowmad Services Inc.

View raw message