+ $msg = q(
+Would you like to run the database-dependent test suite?);
+ $msg .= _add_valid_values_disp( 'RUN_DATABASE_TESTS', $valid_values );
+ $config{'RUN_DATABASE_TESTS'} = _get_value( 'RUN_DATABASE_TESTS', $msg, $defaults->{'RUN_DATABASE_TESTS'}, $valid_values, $install_log_values );
+
+ if ( $config{'RUN_DATABASE_TESTS'} eq 'yes' ) {
+ $config{'TEST_DB_TYPE'} = $config{'DB_TYPE'};
+ $config{'TEST_DB_HOST'} = $config{'DB_HOST'};
+ $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);
+ while ( $config{'TEST_DB_NAME'} eq $config{'DB_NAME'} ) {
+ $msg = q(Please do not use the same database for testing as you do for production. You run the severe risk of data loss.);
+ $config{'TEST_DB_NAME'} = _get_value('TEST_DB_NAME', $msg, $defaults->{'TEST_DB_NAME'}, $valid_values, $install_log_values);
+ }
+
+ $msg = q(
+Please specify the user that owns the database to be
+used by Koha);
+ $config{'TEST_DB_USER'} = _get_value('TEST_DB_USER', $msg, $defaults->{'TEST_DB_USER'}, $valid_values, $install_log_values);
+
+ $msg = q(
+Please specify the password of the user that owns the
+database to be used by Koha);
+ $config{'TEST_DB_PASS'} = _get_value('TEST_DB_PASS', $msg, $defaults->{'TEST_DB_PASS'}, $valid_values, $install_log_values);
+ }
+