storage->disconnect and new tests for out-of-line implicit rels
[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     no_implicit_rels => 1,
22 );
23
24 if( !$dsn || !$user ) {
25     $tester->skip_tests('You need to set the DBICTEST_MYSQL_DSN, _USER, and _PASS environment variables');
26 }
27 else {
28     $tester->run_tests();
29 }