thanks to ribasushi for _sqlite_dbname and fixing 93storage_replication.t
Johannes Plunien [Wed, 24 Sep 2008 22:07:22 +0000 (00:07 +0200)]
t/93storage_replication.t
t/lib/DBICTest.pm

index 0293804..07e696a 100644 (file)
@@ -62,6 +62,7 @@ TESTSCHEMACLASSES: {
         my $class = shift @_;
         
         my $schema = DBICTest->init_schema(
+            sqlite_use_file => 1,
             storage_type=>{
                '::DBI::Replicated' => {
                        balancer_type=>'::Random',
index 617d6c5..2208378 100755 (executable)
@@ -51,16 +51,20 @@ sub has_custom_dsn {
 }
 
 sub _sqlite_dbfilename {
+    return "t/var/DBIxClass.db";
+}
+
+sub _sqlite_dbname {
     my $self = shift;
     my %args = @_;
-    return "t/var/DBIxClass.db" if $args{sqlite_use_file} or $ENV{"DBICTEST_SQLITE_USE_FILE"};
+    return $self->_sqlite_dbfilename if $args{sqlite_use_file} or $ENV{"DBICTEST_SQLITE_USE_FILE"};
        return ":memory:";
 }
 
 sub _database {
     my $self = shift;
     my %args = @_;
-    my $db_file = $self->_sqlite_dbfilename(%args);
+    my $db_file = $self->_sqlite_dbname(%args);
 
     unlink($db_file) if -e $db_file;
     unlink($db_file . "-journal") if -e $db_file . "-journal";