Introduce GOVERNANCE document and empty RESOLUTIONS file.
[dbsrgits/DBIx-Class.git] / t / storage / global_destruction.t
index 6bddfd7..5b7fc85 100644 (file)
@@ -1,3 +1,5 @@
+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
+
 use strict;
 use warnings;
 
@@ -8,30 +10,20 @@ BEGIN { $ENV{DBIC_STORAGE_RETRY_DEBUG} = 1 }
 
 use DBIx::Class::Optional::Dependencies ();
 
-use lib qw(t/lib);
+
 use DBICTest;
 
 for my $type (qw/PG MYSQL SQLite/) {
 
   SKIP: {
+
+    DBIx::Class::Optional::Dependencies->skip_without( 'test_rdbms_' . lc $type );
+
     my @dsn = $type eq 'SQLite'
-      ? DBICTest->_database(sqlite_use_file => 1)
-      : do {
-        skip "Skipping $type tests without DBICTEST_${type}_DSN", 1
-          unless $ENV{"DBICTEST_${type}_DSN"};
-        @ENV{map { "DBICTEST_${type}_${_}" } qw/DSN USER PASS/}
-      }
+      ? ( DBICTest->_database(sqlite_use_file => 1) )
+      : ( @ENV{map { "DBICTEST_${type}_${_}" } qw/DSN USER PASS/} )
     ;
 
-    if ($type eq 'PG') {
-      skip "skipping Pg tests without dependencies installed", 1
-        unless DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_pg');
-    }
-    elsif ($type eq 'MYSQL') {
-      skip "skipping MySQL tests without dependencies installed", 1
-        unless DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_mysql');
-    }
-
     my $schema = DBICTest::Schema->connect (@dsn);
 
     # emulate a singleton-factory, just cache the object *somewhere in a different package*