[Koha-bugs] [Bug 2819] New: test suite uses database to find languages before database is set up
bugzilla-daemon at pippin.metavore.com
bugzilla-daemon at pippin.metavore.com
Tue Nov 25 16:33:00 CET 2008
http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=2819
Summary: test suite uses database to find languages before
database is set up
Product: Koha
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P3
Component: Test Suite
AssignedTo: Andrew.moore at liblime.com
ReportedBy: Andrew.moore at liblime.com
QAContact: koha-bugs at lists.koha.org
In order to find the languages for which the test suite should load SQL files,
it queries the database. Unfortunately, it does this before the database is
setup.
This is from KohaTest.pm:
sub create_test_database {
diag 'creating testing database...';
my $installer = C4::Installer->new() or die 'unable to create new
installer';
# warn Data::Dumper->Dump( [ $installer ], [ 'installer' ] );
my $all_languages = getAllLanguages();
my $error = $installer->load_db_schema();
die "unable to load_db_schema: $error" if ( $error );
my $list = $installer->sql_file_list('en', 'marc21', { optional => 1,
mandatory => 1 } );
my ($fwk_language, $installed_list) =
$installer->load_sql_in_order($all_languages, @$list);
$installer->set_version_syspref();
$installer->set_marcflavour_syspref('MARC21');
$installer->set_indexing_engine(0);
diag 'database created.'
}
I think we might be able to move the call to GetAllLangues to after the call to
load_db_schema in order to get around this. Otherwise, we may have to hit the
filesystem to see what directories exist.
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.
More information about the Koha-bugs
mailing list