259b1e3f9142827f60334009a696569c8dcf601d
[dbsrgits/DBIx-Class-Schema-Loader.git] / t / backcompat / 0.04006 / 13db2_common.t
1 use strict;
2 use lib qw(t/backcompat/0.04006/lib);
3 use dbixcsl_common_tests;
4 use Test::More;
5 plan skip_all => 'set SCHEMA_LOADER_TESTS_BACKCOMPAT to enable these tests'
6     unless $ENV{SCHEMA_LOADER_TESTS_BACKCOMPAT};
7
8
9 my $dsn      = $ENV{DBICTEST_DB2_DSN} || '';
10 my $user     = $ENV{DBICTEST_DB2_USER} || '';
11 my $password = $ENV{DBICTEST_DB2_PASS} || '';
12
13 my $tester = dbixcsl_common_tests->new(
14     vendor         => 'DB2',
15     auto_inc_pk    => 'INTEGER GENERATED BY DEFAULT AS IDENTITY NOT NULL PRIMARY KEY',
16     dsn            => $dsn,
17     user           => $user,
18     password       => $password,
19     db_schema      => uc $user,
20 );
21
22 if( !$dsn || !$user ) {
23     $tester->skip_tests('You need to set the DBICTEST_DB2_DSN, _USER, and _PASS environment variables');
24 }
25 else {
26     $tester->run_tests();
27 }