in reply to Re^4: RFC: Apache2::CloseKeepAlive
in thread RFC: Apache2::CloseKeepAlive
there has to be a DB to run the tests
tests can and should be done with test data not live data. If you find no html and jpegs on the machine (for example because the data wasn't deployed yet) do you just drop the tests?
"your database"-> "the database of your module". You ask why anyone would care? For example a part of the website might need unchanged connections because a legacy application uses a packet sniffer to generate some statistics, or some custom application connecting to your website doesn't work correctly with your module (I don't know if this is a realistic possibility). What if part of the apache data directory is a loop-back filesystem with virtual files whose content is dynamically created by a program? No sense in including that into the database
"overflow the /var space" -> "fill the /var partition until the partition is full, i.e. there is no disk space left"
How can an Apache2 installation be so non-standard that the DB-making program can't follow the links among its .html files?
Does your script work correctly with circular symbolic links (i.e. links that point to directories above it), or would it go into an endless loop? Are you sure you have thought of everything else and eliminated every possible bug that could rain on a simple install?
I'm not arguing that software has to be absolutely bug free. My point (with all of these examples) is that a sysadmin or potential user is expecting a cpan installation of a module to install, not to run lots of fancy routines, that could error out or even crash, as part of the installation. If someone just wants to evaluate your module or look at the source he doesn't want (or expect) a database to be created. Especially on security-concious installations he doesn't want there to be databases he doesn't know about and later has to find out who or what created that thing. Sysadmins don't like surprising behaviour.
The same goes for testing. Testing should not create a live database. If you need a database for the test, create it with sample data in /tmp or your test directory (and delete it afterwards) or use mock-up techniques because you can't expect there to always be live data. (PS: mock-up in this case means to simulate a database interface with a script that behaves just like the database, see for example Test::MockDBI)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: RFC: Apache2::CloseKeepAlive
by cmac (Monk) on Aug 28, 2009 at 20:56 UTC | |
by jethro (Monsignor) on Aug 28, 2009 at 22:18 UTC |