Commit | Line | Data |
a78e3fed |
1 | use strict; |
c2849787 |
2 | use lib qw(t/lib); |
fbd83464 |
3 | use dbixcsl_common_tests; |
a78e3fed |
4 | |
9e978a19 |
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; |
a78e3fed |
9 | |
9e978a19 |
10 | my $skip_rels_msg = 'You need to set the DBICTEST_MYSQL_INNODB environment variable to test relationships'; |
a78e3fed |
11 | |
fbd83464 |
12 | my $tester = dbixcsl_common_tests->new( |
52bf3f26 |
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 | no_implicit_rels => 1, |
a78e3fed |
22 | ); |
23 | |
9e978a19 |
24 | if( !$dsn || !$user ) { |
25 | $tester->skip_tests('You need to set the DBICTEST_MYSQL_DSN, _USER, and _PASS environment variables'); |
a78e3fed |
26 | } |
27 | else { |
28 | $tester->run_tests(); |
29 | } |