loader as a schema subclass basically working (needs some cleanup and docs and whatnot)
[dbsrgits/DBIx-Class-Schema-Loader.git] / t / 11mysql_common.t
CommitLineData
a78e3fed 1use strict;
2use lib qw( . ./t );
3use dbixcl_common_tests;
4
5my $database = $ENV{MYSQL_NAME} || '';
6my $user = $ENV{MYSQL_USER} || '';
7my $password = $ENV{MYSQL_PASS} || '';
8my $test_innodb = $ENV{MYSQL_TEST_INNODB} || 0;
9
10my $skip_rels_msg = 'You need to set the MYSQL_TEST_INNODB environment variable to test relationships';
11
12my $tester = dbixcl_common_tests->new(
13 vendor => 'Mysql',
14 auto_inc_pk => 'INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT',
15 innodb => q{Engine='InnoDB'},
16 dsn => "dbi:mysql:$database",
17 user => $user,
18 password => $password,
19 skip_rels => $test_innodb ? 0 : $skip_rels_msg,
20 multi_fk_broken => 1,
21);
22
23if( !$database || !$user ) {
24 $tester->skip_tests('You need to set the MYSQL_NAME, MYSQL_USER and MYSQL_PASS environment variables');
25}
26else {
27 $tester->run_tests();
28}