Commit | Line | Data |
9a95164d |
1 | use strict; |
1c94fb11 |
2 | use lib qw(t/backcompat/0.04006/lib); |
9a95164d |
3 | use dbixcsl_common_tests; |
1c94fb11 |
4 | use Test::More; |
fb3bb595 |
5 | plan skip_all => 'set SCHEMA_LOADER_TESTS_BACKCOMPAT to enable these tests' |
1c94fb11 |
6 | unless $ENV{SCHEMA_LOADER_TESTS_BACKCOMPAT}; |
7 | |
9a95164d |
8 | |
9 | my $dsn = $ENV{DBICTEST_MYSQL_DSN} || ''; |
10 | my $user = $ENV{DBICTEST_MYSQL_USER} || ''; |
11 | my $password = $ENV{DBICTEST_MYSQL_PASS} || ''; |
12 | my $test_innodb = $ENV{DBICTEST_MYSQL_INNODB} || 0; |
13 | |
14 | my $skip_rels_msg = 'You need to set the DBICTEST_MYSQL_INNODB environment variable to test relationships'; |
15 | |
16 | my $tester = dbixcsl_common_tests->new( |
17 | vendor => 'Mysql', |
18 | auto_inc_pk => 'INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT', |
19 | innodb => $test_innodb ? q{Engine=InnoDB} : 0, |
20 | dsn => $dsn, |
21 | user => $user, |
22 | password => $password, |
23 | skip_rels => $test_innodb ? 0 : $skip_rels_msg, |
24 | no_inline_rels => 1, |
25 | no_implicit_rels => 1, |
26 | ); |
27 | |
28 | if( !$dsn || !$user ) { |
29 | $tester->skip_tests('You need to set the DBICTEST_MYSQL_DSN, _USER, and _PASS environment variables'); |
30 | } |
31 | else { |
32 | $tester->run_tests(); |
33 | } |