2b59b076f22894d5cf9fc3ee8508ba88ce5e4afb
[dbsrgits/DBIx-Class-Schema-Loader.git] / t / 16mssql_common.t
1 use strict;
2 use warnings;
3
4 # use this if you keep a copy of DBD::Sybase linked to FreeTDS somewhere else
5 BEGIN {
6   if (my $lib_dirs = $ENV{DBICTEST_MSSQL_PERL5LIB}) {
7     unshift @INC, $_ for split /:/, $lib_dirs;
8   }
9 }
10
11 use lib qw(t/lib);
12 use dbixcsl_common_tests;
13 use dbixcsl_mssql_extra_tests;
14
15 my $dsn      = $ENV{DBICTEST_MSSQL_DSN} || '';
16 my $user     = $ENV{DBICTEST_MSSQL_USER} || '';
17 my $password = $ENV{DBICTEST_MSSQL_PASS} || '';
18
19 my $tester = dbixcsl_common_tests->new(
20     vendor      => 'mssql',
21     auto_inc_pk => 'INTEGER IDENTITY NOT NULL PRIMARY KEY',
22     dsn         => $dsn,
23     user        => $user,
24     password    => $password,
25     extra       => dbixcsl_mssql_extra_tests->extra,
26 );
27
28 if( !$dsn || !$user ) {
29     $tester->skip_tests('You need to set the DBICTEST_MSSQL_DSN, _USER, and _PASS environment variables');
30 }
31 else {
32     $tester->run_tests();
33 }