[Rt-commit] r13717 - rt/3.8/trunk/lib/RT

clkao at bestpractical.com clkao at bestpractical.com
Tue Jul 1 13:22:09 EDT 2008


Author: clkao
Date: Tue Jul  1 13:22:09 2008
New Revision: 13717

Modified:
   rt/3.8/trunk/lib/RT/Test.pm

Log:
don't require RT_DBA_USER/RT_DBA_PASSWORD for SQLite to run tests.


Modified: rt/3.8/trunk/lib/RT/Test.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Test.pm	(original)
+++ rt/3.8/trunk/lib/RT/Test.pm	Tue Jul  1 13:22:09 2008
@@ -171,12 +171,18 @@
 
 my $created_new_db;    # have we created new db? mainly for parallel testing
 
+sub db_requires_no_dba {
+    my $self = shift;
+    my $db_type = RT->Config->Get('DatabaseType');
+    return 1 if $db_type eq 'SQLite';
+}
+
 sub bootstrap_db {
     my $self = shift;
     my %args = @_;
 
    unless (defined $ENV{'RT_DBA_USER'} && defined $ENV{'RT_DBA_PASSWORD'}) {
-	BAIL_OUT("RT_DBA_USER and RT_DBA_PASSWORD environment variables need to be set in order to run 'make test'");
+	BAIL_OUT("RT_DBA_USER and RT_DBA_PASSWORD environment variables need to be set in order to run 'make test'") unless $self->db_requires_no_dba;
    }
     # bootstrap with dba cred
     my $dbh = _get_dbh(RT::Handle->SystemDSN,


More information about the Rt-commit mailing list