X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F10_02mysql_common.t;h=082ac5281cb04cf326ffd912adcfa180fb476ecd;hb=406a97c2aab476c7a52f7c623a95f275eeb376f3;hp=2f21a4240ed26c95e5bcfb5e9556a54dd6c2b5bc;hpb=b87ab3912a3fd6e7b3eb435d492247961a040c7f;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/t/10_02mysql_common.t b/t/10_02mysql_common.t index 2f21a42..082ac52 100644 --- a/t/10_02mysql_common.t +++ b/t/10_02mysql_common.t @@ -1,10 +1,12 @@ +use DBIx::Class::Schema::Loader::Optional::Dependencies + -skip_all_without => 'test_rdbms_mysql'; + use strict; use warnings; use Test::More; use Test::Exception; use Try::Tiny; use File::Path 'rmtree'; -use DBIx::Class::Optional::Dependencies; use DBIx::Class::Schema::Loader::Utils 'slurp_file'; use DBIx::Class::Schema::Loader 'make_schema_at'; @@ -26,7 +28,9 @@ my $innodb = $test_innodb ? q{Engine=InnoDB} : ''; my ($schema, $databases_created); # for cleanup in END for extra tests -my $tester = dbixcsl_common_tests->new( +diag $skip_rels_msg if not $test_innodb; + +dbixcsl_common_tests->new( vendor => 'Mysql', auto_inc_pk => 'INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT', innodb => $innodb, @@ -499,18 +503,7 @@ EOF } }, }, -); - -if( !$dsn || !$user ) { - $tester->skip_tests('You need to set the DBICTEST_MYSQL_DSN, DBICTEST_MYSQL_USER, and DBICTEST_MYSQL_PASS environment variables'); -} -elsif (!DBIx::Class::Optional::Dependencies->req_ok_for ('rdbms_mysql')) { - $tester->skip_tests('You need to install ' . DBIx::Class::Optional::Dependencies->req_missing_for ('rdbms_mysql')); -} -else { - diag $skip_rels_msg if not $test_innodb; - $tester->run_tests(); -} +)->run_tests; END { if (not $ENV{SCHEMA_LOADER_TESTS_NOCLEANUP}) {