mysql test was broken for mysqlds that do not support innodb at all, fixed now
[dbsrgits/DBIx-Class-Schema-Loader.git] / t / 11mysql_common.t
1 use strict;
2 use lib qw( . ./t );
3 use dbixcsl_common_tests;
4
5 my $dsn         = $ENV{DBICTEST_MYSQL_DSN} || '';
6 my $user        = $ENV{DBICTEST_MYSQL_USER} || '';
7 my $password    = $ENV{DBICTEST_MYSQL_PASS} || '';
8 my $test_innodb = $ENV{DBICTEST_MYSQL_INNODB} || 0;
9
10 my $skip_rels_msg = 'You need to set the DBICTEST_MYSQL_INNODB environment variable to test relationships';
11
12 my $tester = dbixcsl_common_tests->new(
13     vendor          => 'Mysql',
14     auto_inc_pk     => 'INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT',
15     innodb          => $test_innodb ? q{Engine=InnoDB} : 0,
16     dsn             => $dsn,
17     user            => $user,
18     password        => $password,
19     skip_rels       => $test_innodb ? 0 : $skip_rels_msg,
20     no_inline_rels  => 1,
21 );
22
23 if( !$dsn || !$user ) {
24     $tester->skip_tests('You need to set the DBICTEST_MYSQL_DSN, _USER, and _PASS environment variables');
25 }
26 else {
27     $tester->run_tests();
28 }