]> git.decadent.org.uk Git - maypole.git/blobdiff - t/db_colinfo.t
made db_colinfo test less fragile, changed test on @ISA to work with different ordering
[maypole.git] / t / db_colinfo.t
index 50f885f5971aa1d67b75df227837b2ba4a28b5ef..8f38f3bea85b3b901807b81f029a5be019ace354 100755 (executable)
@@ -4,7 +4,12 @@ use Data::Dumper;
 use DBI;
 use lib 'examples'; # Where BeerDB should live
 BEGIN {
-       my $drh = eval { DBI->install_driver("mysql"); };
+       my $drh = eval {
+         DBI->install_driver("mysql");
+         my @databases = DBI->data_sources("mysql");
+         die "couldn't connect to mysql" unless (@databases);
+       };
+       warn "error : $@ \n" if ($@);
         my $testcount = ($@) ? 45 : 65 ;
         plan tests => $testcount;
 }