X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F10_03pg_common.t;h=0225b336ad78eecd4c24dd0480056fe094d59642;hb=406a97c2aab476c7a52f7c623a95f275eeb376f3;hp=0c66a3c8c75d4e5a6f6cb72b9813aee9dc4dbf77;hpb=b87ab3912a3fd6e7b3eb435d492247961a040c7f;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/t/10_03pg_common.t b/t/10_03pg_common.t index 0c66a3c..0225b33 100644 --- a/t/10_03pg_common.t +++ b/t/10_03pg_common.t @@ -1,7 +1,9 @@ +use DBIx::Class::Schema::Loader::Optional::Dependencies + -skip_all_without => 'test_rdbms_pg'; + use strict; use warnings; use utf8; -use DBIx::Class::Optional::Dependencies; use DBIx::Class::Schema::Loader 'make_schema_at'; use DBIx::Class::Schema::Loader::Utils qw/no_warnings slurp_file/; use Test::More; @@ -20,7 +22,7 @@ my $dsn = $ENV{DBICTEST_PG_DSN} || ''; my $user = $ENV{DBICTEST_PG_USER} || ''; my $password = $ENV{DBICTEST_PG_PASS} || ''; -my $tester = dbixcsl_common_tests->new( +dbixcsl_common_tests->new( vendor => 'Pg', auto_inc_pk => 'SERIAL NOT NULL PRIMARY KEY', dsn => $dsn, @@ -485,17 +487,7 @@ my $tester = dbixcsl_common_tests->new( 'unique indexes are dumped correctly'; }, }, -); - -if( !$dsn || !$user ) { - $tester->skip_tests('You need to set the DBICTEST_PG_DSN, _USER, and _PASS environment variables'); -} -elsif (!DBIx::Class::Optional::Dependencies->req_ok_for ('rdbms_pg')) { - $tester->skip_tests('You need to install ' . DBIx::Class::Optional::Dependencies->req_missing_for ('rdbms_pg')); -} -else { - $tester->run_tests(); -} +)->run_tests(); END { rmtree EXTRA_DUMP_DIR unless $ENV{SCHEMA_LOADER_TESTS_NOCLEANUP};