X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F93storage_replication.t;h=ab2ffe481a00db64bdf9908a89545dcfa4834fcd;hb=1a304e513dc3fb708512877ab25423b567e1bedc;hp=854841b5911955fda256b9bb40e9e36e63d0535d;hpb=c354902c20a8459162b76a4006cb6091af5bf6d4;p=dbsrgits%2FDBIx-Class.git diff --git a/t/93storage_replication.t b/t/93storage_replication.t index 854841b..ab2ffe4 100644 --- a/t/93storage_replication.t +++ b/t/93storage_replication.t @@ -6,9 +6,9 @@ use Test::Exception; use DBICTest; BEGIN { - eval "use Moose; use Test::Moose"; + eval "use DBIx::Class::Storage::DBI::Replicated; use Test::Moose"; plan $@ - ? ( skip_all => 'needs Moose for testing' ) + ? ( skip_all => "Deps not installed: $@" ) : ( tests => 79 ); } @@ -59,9 +59,13 @@ TESTSCHEMACLASSES: { ## Get the Schema and set the replication storage type sub init_schema { + # current SQLT SQLite producer does not handle DROP TABLE IF EXISTS, trap warnings here + local $SIG{__WARN__} = sub { warn @_ unless $_[0] =~ /no such table.+DROP TABLE/ }; + my $class = shift @_; - + my $schema = DBICTest->init_schema( + sqlite_use_file => 1, storage_type=>{ '::DBI::Replicated' => { balancer_type=>'::Random',