if ( $config{'RUN_DATABASE_TESTS'} eq 'yes' ) {
$config{'TEST_DB_TYPE'} = $config{'DB_TYPE'};
$config{'TEST_DB_HOST'} = $config{'DB_HOST'};
- $msg = q(
+ $msg = q(TEST DATABASE
+
+THE DATA IN THIS DATABASE WILL BE DESTROYED during the process of
+testing. Please don't do this on your production database. It is not
+reversable.
+
+YOU WILL SUFFER DATA LOSS if you run this test suite on your test
+database. You are better off not running this optional test suite than
+doing it in a database that you don't want to lose.
+
Please specify the name of the test database to be
used by Koha);
+
$config{'TEST_DB_NAME'} = _get_value('TEST_DB_NAME', $msg, $defaults->{'TEST_DB_NAME'}, $valid_values, $install_log_values);
$msg = q(
=cut
-=head2 startup_10_prepare_database
-
-prepare a blank database.
-
-This ends up getting run once for each test module, so that's several
-times throughout the test suite. That may be too many times to refresh
-the database. We may have to tune that.
-
-=cut
-
-sub startup_10_prepare_database : Test(startup => 1) {
- my $self = shift;
- # this is how I'm refreshing my database for now. I'll think of
- # something better later. Eventually, I'd like to drop the
- # database entirely and use the regular install code to rebuild a
- # base database.
- my $class = ref $self;
-
- # like( C4::Context->config( 'database '), qr/test$/, 'using test database: ' . C4::Context->config( 'database' ) )
- like( C4::Context->database(), qr/test$/, 'using test database: ' . C4::Context->database() )
- or BAIL_OUT( 'This appears to not be a test database.' );
-
- return;
-}
-
sub startup_15_truncate_tables : Test( startup => 1 ) {
my $self = shift;