X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Ficdt%2Fengine_specific%2Fsqlite.t;h=837d62fd96937d42ad45e5400f930227f73b0138;hb=8b60b9211a085572446bbfd19e879d00ae03658a;hp=3077371f9da12861bd88298f62ef9019ce8854fc;hpb=8548e45cbaa8d8862ca78f675c73398ec2b0dc1d;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/icdt/engine_specific/sqlite.t b/t/icdt/engine_specific/sqlite.t index 3077371..837d62f 100644 --- a/t/icdt/engine_specific/sqlite.t +++ b/t/icdt/engine_specific/sqlite.t @@ -1,4 +1,4 @@ -use DBIx::Class::Optional::Dependencies -skip_all_without => 'test_dt_sqlite'; +use DBIx::Class::Optional::Dependencies -skip_all_without => qw( icdt test_rdbms_sqlite ); use strict; use warnings; @@ -15,19 +15,26 @@ use DBICTest; no_deploy => 1, # Deploying would cause an early rebless ); - is( - ref $schema->storage, 'DBIx::Class::Storage::DBI', - 'Starting with generic storage' - ); + my $storage = $schema->storage; + + if ($ENV{DBICTEST_VIA_REPLICATED}) { + $storage = $storage->master; + } + else { + is( + ref $storage, 'DBIx::Class::Storage::DBI', + 'Starting with generic storage' + ); + } # Calling date_time_parser should cause the storage to be reblessed, # so that we can pick up datetime_parser_type from subclasses - my $parser = $schema->storage->datetime_parser(); + my $parser = $storage->datetime_parser(); is($parser, 'DateTime::Format::SQLite', 'Got expected storage-set datetime_parser'); - isa_ok($schema->storage, 'DBIx::Class::Storage::DBI::SQLite', 'storage'); + isa_ok($storage, 'DBIx::Class::Storage::DBI::SQLite', 'storage'); - ok(! $schema->storage->connected, 'Not yet connected'); + ok(! $storage->connected, 'Not yet connected'); } # so user's env doesn't screw us