At this point all we're doing is turning on warnings, strict, and 5.10 features by default in all files. This also defines a $Koha::VERSION variable which is going to be the basis for the code revision number, as opposed to $C4::Context::VERSION, which is the data config version number.
Moved routines to clear and create database and manage zebraqueue_daemon.pl to KohaTest.pm so that they're available to test classes - needed for installation and upgrade tests in particular. Signed-off-by: Joshua Ferraro <email@example.com>
 When running the database-dependent tests (cd t, make test), all tables in the test database are dropped prior to running the installer and test cases. This means that the test database will start with a clean slate.  It is now possible to specify a single test class to run, to avoid having to run all of them: cd t make test TEST_CLASS=Search To run all DB-dependent tests, just do the usual cd t make test Signed-off-by: Joshua Ferraro <firstname.lastname@example.org>
…d libraries This patch makes the test suite work even when $PERL5LIB isn't set to the install directory. It replaces $PERL5LIB with '..' in order to help ensure that we're loading the C4 libraries out of the installation directory. Signed-off-by: Joshua Ferraro <email@example.com>
* All configuration and run-time files created during a test suite run now live under t/run * made sure scripts copied to t/run/bin are executable * added t/run and t/test-config.txt to .gitignore Signed-off-by: Andrew Moore <firstname.lastname@example.org> Signed-off-by: Joshua Ferraro <email@example.com>
I'm adding a bunch of additions to the test suite. There is now a test database that is created, and a test instance of the zebra server and daemon that are run before the tests in t/database-dependent.pl are run. This means that you can test things that insert (or destroy) things in the database. To use these tests, after you 'make' your koha installation, you can change to the 't' directory and 'make test' there. There is now an additional question asked during installation. It asks whether you would like to run the data-dependent tests. If so, It asks you for some login information to a test database. I recommend that you do not not use your production database here. It will delete all of the data in it. Things that need improvement: * I suspect that there are large parts that are not very platform independent, so they will need to be improved. * There are some parts of the installer that will probably be refactored to let this work a little bit better, including being run directly from a main-level 'make' target at some point. * Lots more tests to add. Be bold! (see the t/lib directory) * other tests in t/*.t can possibly benefit from being included in here. There are two required perl modules for this part of the test suite. I use: 'Test::Class' => 0.028, 'Test::Class::Load' => 0.02, They are not listed as requirements in the top-level Makefile.PL because they're not actually required to install or use Koha, but if you want to run the test suite, you can install them from CPAN. Signed-off-by: Galen Charlton <firstname.lastname@example.org> Signed-off-by: Joshua Ferraro <email@example.com>