Commit graph

8 commits

Author SHA1 Message Date
Andrew Moore
db755a4307 bug 2088: test suite refactoring to deal with t/override_context_prefs.pm
Some minor changes to get the test suite working a bit better:
I removed a superfluous method from t/lib/KohaTest.pm.
I made each barcode for the items added in KohaTest.pm unique so that they would actually get inserted.

Then, I removed t/override_context_prefs.pm. If you need that functionality, you're a database
dependent test and should be a module in t/lib.
So, I deleted all of the trivial .t tests that just 'use'd their modules and had no other
tests and replaced them with lib/KohaTest/*pm modules that do a little bit more checking
on those modules.
I removed the references to override_context_prefs.pm in all of the other .t modules.
They all pass now with no override_context_prefs.pm module.

The database_depenedent.pl test script still does not pass entirely. There's a problem with the zebra index
not being reset each time that the tables are truncated. I'll get to that.

no functional or documentation changes here.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-11 06:48:40 -05:00
Andrew Moore
26531a6a43 bug 2087: test cases for misc/cronjobs/longoverdue.pl
I'm adding some functional tests that demonstrate that long_overdue.pl does what we think it does.
These tests don't actually work since override_context_prefs.pm gets in the way of C4::Context::preference. I opened up bug 2088 to address that.

There are no functional or documentation changes due to this patch.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-11 06:43:35 -05:00
Galen Charlton
22aa16e87f kohabug 2076 - remove three tables (DB rev 077)
Removed the categorytable, mediatypetable, and subcategorytable
tables.  These three tables appear to be from an incomplete
patch from pre-git that defined these tables to implement
additional search limits, and are not present in the 2.2.9
package.  In 3.0, these tables did nothing - the only code that
referred to them are incomplete admin editors that lack HTML
templates and are not referred to anywhere.

The updatedatabase.pl logic to remove these tables is conservative;
the tables are dropped only if they exist and are all empty.  Effectively,
this means that they'll be dropped if you've been running a fresh install
of 3.0 from git or the alphas or betas; if you've upgraded your database
from 2.2.9, these tables likely weren't in your database to begin with.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-05-01 18:59:28 -05:00
Galen Charlton
f7b5af15c4 added reindexing routine to KohaTest
KohaTest->reindex_marc() does a full Zebra reindexing of
bib and authority records and clears zebraqueue.  It is
meant for use in test classes that do a lot of bib, authority,
and/or item record changes that would be slowed down by
waiting for zebraqueue_daemon.

Also adjusted list of tables that are automatically truncated.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-30 21:58:26 -05:00
Andrew Moore
1a6d84c4a6 testing framework: adding more warnings about possible data loss
I'm adding some more warnings in Makefile.PL to indicate that you WILL lose the data
in your testing database.

I've also relaxed the requirement that the teting database have "test" in its name.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-22 09:09:05 -05:00
Andrew Moore
d6f2a2ef9c testing framework: replacing PERL5LIB in order to more conidently find 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 <jmf@liblime.com>
2008-04-22 08:40:43 -05:00
Galen Charlton
e46bceb305 test suite: removed dep on 'acm' user
Signed-off-by: Andrew Moore <andrew.moore@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-21 11:26:29 -05:00
Andrew Moore
d37e9712eb adding database-dependent test libs.
These test libs should have been included in the previous patch.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-21 11:26:28 -05:00