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