From: Johannes Plunien Date: Wed, 24 Sep 2008 22:07:22 +0000 (+0200) Subject: thanks to ribasushi for _sqlite_dbname and fixing 93storage_replication.t X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bcb3e850657cd5d7a7d135b999fafc9a3a85bd4a;p=dbsrgits%2FDBIx-Class-Historic.git thanks to ribasushi for _sqlite_dbname and fixing 93storage_replication.t --- diff --git a/t/93storage_replication.t b/t/93storage_replication.t index 0293804..07e696a 100644 --- a/t/93storage_replication.t +++ b/t/93storage_replication.t @@ -62,6 +62,7 @@ TESTSCHEMACLASSES: { my $class = shift @_; my $schema = DBICTest->init_schema( + sqlite_use_file => 1, storage_type=>{ '::DBI::Replicated' => { balancer_type=>'::Random', diff --git a/t/lib/DBICTest.pm b/t/lib/DBICTest.pm index 617d6c5..2208378 100755 --- a/t/lib/DBICTest.pm +++ b/t/lib/DBICTest.pm @@ -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";