On Thu, Jan 15, 2004 at 04:24:41PM -0800, Stas Bekman wrote: > I don't have apache 1.3 with ssl so I can't test it. And it doesn't quite > work with apache/mp 2.0 because you have hardcoded mp1 API. Please see the > porting doc: http://perl.apache.org/docs/2.0/user/porting/porting.html > http://perl.apache.org/docs/2.0/user/porting/porting.html#Making_Code_Conditional_on_Running_mod_perl_Version
Oops. Nice info in the links. > Also you may want to adopt the convention we use for other test suites, > where the response part of the test resides under t/response. So you > usually don't test the module as is, but you create a response handler that > tests it. But it doesn't have to be that way of course. OK. FYI, I didn't see anything about this in the docs. I looked at the t/ dir in Apache::Test and only see request.t and ping.t. The extra.conf.in was basically empty. Which other test suites did you have in mind? > Now to your issues: > > > - APACHE_TEST_LIVE_DEV=1 environment > > I have written a test in 02_livedev.t which tests this setting and > > checks that the first directory in @INC does not contain 'blib'. This > > probably isn't a safe test for distribution due to the possibility of > > blib being in someone's path. However, I think it is sufficient for > > debugging purposes. This test fails on my system. > > this is because you are testing in the "wrong" place. APACHE_TEST_LIVE_DEV > affects the server, not the client. It adds 'lib' in modperl_inc.pl which > affects the server. You need to write a response part of the test like we > do in all other test suites and test it there. So in my case the TEST script that runs my tests is acting as the client? I'm not seeing how creating a response handler is going to make this work. Is the response handler setup in the extra.conf.in or with a test? > Yes, I saw that. I think it's a bad idea, since it'll reconfigure the > server every time you run the tests. Usually developers write scripts to > test things, so they can explicitly add -port select if they want to. At > least that's what I do with my tests. OK, just thought I'd see if there were a way to automate things a bit. What do you mean by the server is reconfigured every time? If I'm starting the server on each test, it seems like that would happen whether I specified -port select or not. Thanks, William -- Knowmad Services Inc. http://www.knowmad.com