my $rdbms_db2 = {
'DBD::DB2' => '0',
};
+my $rdbms_db2_400 = {
+ 'DBD::ODBC' => '0',
+};
+my $rdbms_informix = {
+ 'DBD::Informix' => '0',
+};
+my $rdbms_sqlanywhere = {
+ 'DBD::SQLAnywhere' => '0',
+};
+my $rdbms_sqlanywhere_odbc = {
+ 'DBD::ODBC' => '0',
+};
+my $rdbms_firebird = {
+ 'DBD::Firebird' => '0',
+};
+my $rdbms_firebird_interbase = {
+ 'DBD::InterBase' => '0',
+};
my $rdbms_firebird_odbc = {
'DBD::ODBC' => '0',
};
},
},
+ rdbms_db2_400 => {
+ req => {
+ %$rdbms_db2_400,
+ },
+ pod => {
+ title => 'DB2 on AS/400 support',
+ desc => 'Modules required to connect to DB2 on AS/400',
+ },
+ },
+
+ rdbms_informix => {
+ req => {
+ %$rdbms_informix,
+ },
+ pod => {
+ title => 'Informix support',
+ desc => 'Modules required to connect to Informix',
+ },
+ },
+
+ rdbms_sqlanywhere => {
+ req => {
+ %$rdbms_sqlanywhere,
+ },
+ pod => {
+ title => 'SQLAnywhere support',
+ desc => 'Modules required to connect to SQLAnywhere',
+ },
+ },
+
+ rdbms_sqlanywhere_odbc => {
+ req => {
+ %$rdbms_sqlanywhere_odbc,
+ },
+ pod => {
+ title => 'SQLAnywhere support via DBD::ODBC',
+ desc => 'Modules required to connect to SQLAnywhere via DBD::ODBC',
+ },
+ },
+
+ rdbms_firebird => {
+ req => {
+ %$rdbms_firebird,
+ },
+ pod => {
+ title => 'Firebird support',
+ desc => 'Modules required to connect to Firebird',
+ },
+ },
+
+ rdbms_firebird_interbase => {
+ req => {
+ %$rdbms_firebird_interbase,
+ },
+ pod => {
+ title => 'Firebird support via DBD::InterBase',
+ desc => 'Modules required to connect to Firebird via DBD::InterBase',
+ },
+ },
+
+ rdbms_firebird_odbc => {
+ req => {
+ %$rdbms_firebird_odbc,
+ },
+ pod => {
+ title => 'Firebird support via DBD::ODBC',
+ desc => 'Modules required to connect to Firebird via DBD::ODBC',
+ },
+ },
+
# the order does matter because the rdbms support group might require
# a different version that the test group
test_rdbms_pg => {
},
},
+ test_rdbms_db2_400 => {
+ req => {
+ $ENV{DBICTEST_DB2_400_DSN}
+ ? (
+ %$rdbms_db2_400,
+ ) : ()
+ },
+ },
+
+ test_rdbms_informix => {
+ req => {
+ $ENV{DBICTEST_INFORMIX_DSN}
+ ? (
+ %$rdbms_informix,
+ ) : ()
+ },
+ },
+
+ test_rdbms_sqlanywhere => {
+ req => {
+ $ENV{DBICTEST_SQLANYWHERE_DSN}
+ ? (
+ %$rdbms_sqlanywhere,
+ ) : ()
+ },
+ },
+
+ test_rdbms_sqlanywhere_odbc => {
+ req => {
+ $ENV{DBICTEST_SQLANYWHERE_ODBC_DSN}
+ ? (
+ %$rdbms_sqlanywhere_odbc,
+ ) : ()
+ },
+ },
+
+ test_rdbms_firebird => {
+ req => {
+ $ENV{DBICTEST_FIREBIRD_DSN}
+ ? (
+ %$rdbms_firebird,
+ ) : ()
+ },
+ },
+
+ test_rdbms_firebird_interbase => {
+ req => {
+ $ENV{DBICTEST_FIREBIRD_INTERBASE_DSN}
+ ? (
+ %$rdbms_firebird_interbase,
+ ) : ()
+ },
+ },
+
test_rdbms_firebird_odbc => {
req => {
$ENV{DBICTEST_FIREBIRD_ODBC_DSN}
if (keys %errors) {
my $missing = join (', ', map { $deps->{$_} ? "$_ >= $deps->{$_}" : $_ } (sort keys %errors) );
$missing .= " (see $class for details)" if $reqs->{$group}{pod};
- $missing .= "\n";
$res = {
status => 0,
errorlist => \%errors,
use strict;
use warnings;
use Test::More;
+use DBIx::Class::Optional::Dependencies ();
+
+plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('rdbms_pg')
+ unless DBIx::Class::Optional::Dependencies->req_ok_for ('rdbms_pg');
my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_PG_${_}" } qw/DSN USER PASS/};
use threads;
use Test::Exception;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
+plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('rdbms_pg')
+ unless DBIx::Class::Optional::Dependencies->req_ok_for ('rdbms_pg');
+
my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_PG_${_}" } qw/DSN USER PASS/};
plan skip_all => 'Set $ENV{DBICTEST_PG_DSN}, _USER and _PASS to run this test'
. ' (note: creates and drops a table named artist!)' unless ($dsn && $user);
use threads;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
+plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('rdbms_pg')
+ unless DBIx::Class::Optional::Dependencies->req_ok_for ('rdbms_pg');
+
my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_PG_${_}" } qw/DSN USER PASS/};
plan skip_all => 'Set $ENV{DBICTEST_PG_DSN}, _USER and _PASS to run this test'
. ' (note: creates and drops a table named artist!)' unless ($dsn && $user);
use DBI::Const::GetInfoType;
use Scalar::Util qw/weaken/;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
use DBIC::SqlMakerTest;
+plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_mysql')
+ unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_mysql');
+
my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_MYSQL_${_}" } qw/DSN USER PASS/};
#warn "$dsn $user $pass";
use Test::More;
use Test::Exception;
use Sub::Name;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
+plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_pg')
+ unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_pg');
my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_PG_${_}" } qw/DSN USER PASS/};
use warnings;
use Test::More;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
+plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('rdbms_pg')
+ unless DBIx::Class::Optional::Dependencies->req_ok_for ('rdbms_pg');
+
my ($dsn, $dbuser, $dbpass) = @ENV{map { "DBICTEST_PG_${_}" } qw/DSN USER PASS/};
plan skip_all => 'Set $ENV{DBICTEST_PG_DSN}, _USER and _PASS to run this test'
use Test::More;
use Sub::Name;
use Try::Tiny;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
use Test::Exception;
use Test::More;
-
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBIC::SqlMakerTest;
$ENV{NLS_COMP} = "BINARY";
$ENV{NLS_LANG} = "AMERICAN";
-plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_oracle')
- unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_oracle');
+plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('rdbms_oracle')
+ unless DBIx::Class::Optional::Dependencies->req_ok_for ('rdbms_oracle');
my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_ORA_${_}" } qw/DSN USER PASS/};
use Test::More;
use Test::Exception;
use Try::Tiny;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
+plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_db2')
+ unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_db2');
+
my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_DB2_${_}" } qw/DSN USER PASS/};
#warn "$dsn $user $pass";
use warnings;
use Test::More;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
+plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_db2_400')
+ unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_db2_400');
+
my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_DB2_400_${_}" } qw/DSN USER PASS/};
#warn "$dsn $user $pass";
use Test::More;
use Test::Exception;
+use Try::Tiny;
+use DBIx::Class::SQLMaker::LimitDialects;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
use DBIC::SqlMakerTest;
-use Try::Tiny;
-use DBIx::Class::SQLMaker::LimitDialects;
+plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_mssql_odbc')
+ unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_mssql_odbc');
+
my $OFFSET = DBIx::Class::SQLMaker::LimitDialects->__offset_bindtype;
my $TOTAL = DBIx::Class::SQLMaker::LimitDialects->__total_bindtype;
use Test::More;
use Test::Exception;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
+plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_ase')
+ unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_ase');
+
my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_SYBASE_${_}" } qw/DSN USER PASS/};
my $TESTS = 66 + 2;
use Test::More;
use Test::Exception;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
+plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_mssql_ado')
+ unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_mssql_ado');
+
# Example DSN (from frew):
# dbi:ADO:PROVIDER=sqlncli10;SERVER=tcp:172.24.2.10;MARS Connection=True;Initial Catalog=CIS;UID=cis_web;PWD=...;DataTypeCompatibility=80;
use Test::More;
use Test::Exception;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
+plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_informix')
+ unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_informix');
+
my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_INFORMIX_${_}" } qw/DSN USER PASS/};
#warn "$dsn $user $pass";
use Test::Exception;
use Scope::Guard ();
use Try::Tiny;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
+my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_SQLANYWHERE_${_}" } qw/DSN USER PASS/};
+my ($dsn2, $user2, $pass2) = @ENV{map { "DBICTEST_SQLANYWHERE_ODBC_${_}" } qw/DSN USER PASS/};
+
+plan skip_all => 'Test needs ' .
+ (join ' or ', map { $_ ? $_ : () }
+ DBIx::Class::Optional::Dependencies->req_missing_for('test_rdbms_sqlanywhere'),
+ DBIx::Class::Optional::Dependencies->req_missing_for('test_rdbms_sqlanywhere_odbc'))
+ unless
+ $dsn && DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_sqlanywhere')
+ or
+ $dsn2 && DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_sqlanywhere_odbc')
+ or
+ (not $dsn || $dsn2);
+
DBICTest::Schema->load_classes('ArtistGUID');
# tests stolen from 748informix.t
-my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_SQLANYWHERE_${_}" } qw/DSN USER PASS/};
-my ($dsn2, $user2, $pass2) = @ENV{map { "DBICTEST_SQLANYWHERE_ODBC_${_}" } qw/DSN USER PASS/};
-
plan skip_all => <<'EOF' unless $dsn || $dsn2;
Set $ENV{DBICTEST_SQLANYWHERE_DSN} and/or $ENV{DBICTEST_SQLANYWHERE_ODBC_DSN},
_USER and _PASS to run these tests
use Test::More;
use Test::Exception;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
+plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_mssql_sybase')
+ unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_mssql_sybase');
+
my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_MSSQL_${_}" } qw/DSN USER PASS/};
plan skip_all => 'Set $ENV{DBICTEST_MSSQL_DSN}, _USER and _PASS to run this test'
use Test::More;
use Test::Exception;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
use Scope::Guard ();
-# tests stolen from 749sybase_asa.t
+my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_FIREBIRD_${_}" } qw/DSN USER PASS/};
+my ($dsn2, $user2, $pass2) = @ENV{map { "DBICTEST_FIREBIRD_INTERBASE_${_}" } qw/DSN USER PASS/};
+my ($dsn3, $user3, $pass3) = @ENV{map { "DBICTEST_FIREBIRD_ODBC_${_}" } qw/DSN USER PASS/};
+
+plan skip_all => 'Test needs ' .
+ (join ' or ', map { $_ ? $_ : () }
+ DBIx::Class::Optional::Dependencies->req_missing_for('test_rdbms_firebird'),
+ DBIx::Class::Optional::Dependencies->req_missing_for('test_rdbms_firebird_interbase'),
+ DBIx::Class::Optional::Dependencies->req_missing_for('test_rdbms_firebird_odbc'))
+ unless
+ $dsn && DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_firebird')
+ or
+ $dsn2 && DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_firebird_interbase')
+ or
+ $dsn3 && DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_firebird_odbc')
+ or
+ (not $dsn || $dsn2 || $dsn3);
-my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_FIREBIRD_${_}" } qw/DSN USER PASS/};
-my ($dsn2, $user2, $pass2) = @ENV{map { "DBICTEST_FIREBIRD_ODBC_${_}" } qw/DSN USER PASS/};
+# tests stolen from 749sybase_asa.t
# Example DSNs:
-# dbi:InterBase:db=/var/lib/firebird/2.5/data/hlaghdb.fdb
# dbi:Firebird:db=/var/lib/firebird/2.5/data/hlaghdb.fdb
+# dbi:InterBase:db=/var/lib/firebird/2.5/data/hlaghdb.fdb
# Example ODBC DSN:
# dbi:ODBC:Driver=Firebird;Dbname=/var/lib/firebird/2.5/data/hlaghdb.fdb
-plan skip_all => <<'EOF' unless $dsn || $dsn2;
-Set $ENV{DBICTEST_FIREBIRD_DSN} and/or $ENV{DBICTEST_FIREBIRD_ODBC_DSN},
+plan skip_all => <<'EOF' unless $dsn || $dsn2 || $dsn3;
+Set $ENV{DBICTEST_FIREBIRD_DSN} and/or $ENV{DBICTEST_FIREBIRD_INTERBASE_DSN}
+and/or $ENV{DBICTEST_FIREBIRD_ODBC_DSN},
_USER and _PASS to run these tests.
WARNING: this test creates and drops the tables "artist", "bindtype_test" and
my @info = (
[ $dsn, $user, $pass ],
[ $dsn2, $user2, $pass2 ],
+ [ $dsn3, $user3, $pass3 ],
);
my $schema;
use Test::Exception;
use Scope::Guard ();
use Try::Tiny;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
use DBIC::DebugObj ();
use DBIC::SqlMakerTest;
+my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_MSACCESS_ODBC_${_}" } qw/DSN USER PASS/};
+my ($dsn2, $user2, $pass2) = @ENV{map { "DBICTEST_MSACCESS_ADO_${_}" } qw/DSN USER PASS/};
+
+plan skip_all => 'Test needs ' .
+ (join ' or ', map { $_ ? $_ : () }
+ DBIx::Class::Optional::Dependencies->req_missing_for('test_rdbms_msaccess_odbc'),
+ DBIx::Class::Optional::Dependencies->req_missing_for('test_rdbms_msaccess_ado'))
+ unless
+ $dsn && DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_msaccess_odbc')
+ or
+ $dsn2 && DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_msaccess_ado')
+ or
+ (not $dsn || $dsn2);
+
DBICTest::Schema->load_classes('ArtistGUID');
# Example DSNs (32bit only):
# dbi:ADO:Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\rkitover\Documents\access_sample.accdb
# dbi:ADO:Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\rkitover\Documents\access_sample.accdb;Persist Security Info=False'
-my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_MSACCESS_ODBC_${_}" } qw/DSN USER PASS/};
-my ($dsn2, $user2, $pass2) = @ENV{map { "DBICTEST_MSACCESS_ADO_${_}" } qw/DSN USER PASS/};
-
plan skip_all => <<'EOF' unless $dsn || $dsn2;
Set $ENV{DBICTEST_MSACCESS_ODBC_DSN} and/or $ENV{DBICTEST_MSACCESS_ADO_DSN} (and optionally _USER and _PASS) to run these tests.
Warning: this test drops and creates the tables 'artist', 'cd', 'bindtype_test' and 'artist_guid'.
EOF
-plan skip_all => 'Test needs ' .
-DBIx::Class::Optional::Dependencies->req_missing_for('test_rdbms_msaccess_odbc')
-. ' or ' .
-DBIx::Class::Optional::Dependencies->req_missing_for('test_rdbms_msaccess_ado')
- unless
- DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_msaccess_odbc')
- or
- DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_msaccess_ado');
-
my @info = (
[ $dsn, $user || '', $pass || '' ],
[ $dsn2, $user2 || '', $pass2 || '' ],
use warnings;
use Test::More;
+use DBIx::Class::Optional::Dependencies ();
my ($create_sql, $dsn, $user, $pass);
if ($ENV{DBICTEST_PG_DSN}) {
+ plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('rdbms_pg')
+ unless DBIx::Class::Optional::Dependencies->req_ok_for ('rdbms_pg');
+
($dsn, $user, $pass) = @ENV{map { "DBICTEST_PG_${_}" } qw/DSN USER PASS/};
$create_sql = "CREATE TABLE artist (artistid serial PRIMARY KEY, name VARCHAR(100), rank INTEGER NOT NULL DEFAULT '13', charfield CHAR(10))";
} elsif ($ENV{DBICTEST_MYSQL_DSN}) {
+ plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_mysql')
+ unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_mysql');
+
($dsn, $user, $pass) = @ENV{map { "DBICTEST_MYSQL_${_}" } qw/DSN USER PASS/};
$create_sql = "CREATE TABLE artist (artistid INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), rank INTEGER NOT NULL DEFAULT '13', charfield CHAR(10)) ENGINE=InnoDB";
use Test::More;
use Test::Exception;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
use Scope::Guard ();
my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_FIREBIRD_${_}" } qw/DSN USER PASS/};
-my ($dsn2, $user2, $pass2) = @ENV{map { "DBICTEST_FIREBIRD_ODBC_${_}" } qw/DSN USER PASS/};
+my ($dsn2, $user2, $pass2) = @ENV{map { "DBICTEST_FIREBIRD_INTERBASE_${_}" } qw/DSN USER PASS/};
+my ($dsn3, $user3, $pass3) = @ENV{map { "DBICTEST_FIREBIRD_ODBC_${_}" } qw/DSN USER PASS/};
+
+plan skip_all => 'Test needs ' .
+ (join ' and ', map { $_ ? $_ : () }
+ DBIx::Class::Optional::Dependencies->req_missing_for('test_dt'),
+ (join ' or ', map { $_ ? $_ : () }
+ DBIx::Class::Optional::Dependencies->req_missing_for('test_rdbms_firebird'),
+ DBIx::Class::Optional::Dependencies->req_missing_for('test_rdbms_firebird_interbase'),
+ DBIx::Class::Optional::Dependencies->req_missing_for('test_rdbms_firebird_odbc')))
+ unless
+ DBIx::Class::Optional::Dependencies->req_ok_for ('test_dt') && (
+ $dsn && DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_firebird')
+ or
+ $dsn2 && DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_firebird_interbase')
+ or
+ $dsn3 && DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_firebird_odbc'))
+ or (not $dsn || $dsn2 || $dsn3);
if (not ($dsn || $dsn2)) {
plan skip_all => <<'EOF';
-Set $ENV{DBICTEST_FIREBIRD_DSN} and/or $ENV{DBICTEST_FIREBIRD_ODBC_DSN}
+Set $ENV{DBICTEST_FIREBIRD_DSN} and/or $ENV{DBICTEST_FIREBIRD_INTERBASE_DSN}
+and/or $ENV{DBICTEST_FIREBIRD_ODBC_DSN}
_USER and _PASS to run this test'.
Warning: This test drops and creates a table called 'event'";
EOF
}
-plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_dt')
- unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_dt');
-
my @info = (
[ $dsn, $user, $pass ],
[ $dsn2, $user2, $pass2 ],
+ [ $dsn3, $user3, $pass3 ],
);
my $schema;
use Test::More;
use Test::Exception;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
use Scope::Guard ();
+plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_dt')
+. ' and ' .
+DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_informix')
+ unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_dt')
+ && DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_informix');
+
my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_INFORMIX_${_}" } qw/DSN USER PASS/};
if (not $dsn) {
EOF
}
-plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_dt')
- unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_dt');
-
my $schema;
{
use Test::Exception;
use Scope::Guard ();
use Try::Tiny;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_MSACCESS_ODBC_${_}" } qw/DSN USER PASS/};
my ($dsn2, $user2, $pass2) = @ENV{map { "DBICTEST_MSACCESS_ADO_${_}" } qw/DSN USER PASS/};
+plan skip_all => 'Test needs ' .
+ (join ' and ', map { $_ ? $_ : () }
+ DBIx::Class::Optional::Dependencies->req_missing_for('test_dt'),
+ (join ' or ', map { $_ ? $_ : () }
+ DBIx::Class::Optional::Dependencies->req_missing_for('test_rdbms_msaccess_odbc'),
+ DBIx::Class::Optional::Dependencies->req_missing_for('test_rdbms_msaccess_ado')))
+ unless
+ DBIx::Class::Optional::Dependencies->req_ok_for ('test_dt') && (
+ $dsn && DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_msaccess_odbc')
+ or
+ $dsn2 && DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_msaccess_ado'))
+ or (not $dsn || $dsn2);
+
plan skip_all => <<'EOF' unless $dsn || $dsn2;
Set $ENV{DBICTEST_MSACCESS_ODBC_DSN} and/or $ENV{DBICTEST_MSACCESS_ADO_DSN} (and optionally _USER and _PASS) to run these tests.
Warning: this test drops and creates the table 'track'.
EOF
-plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_dt')
- unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_dt');
-
my @connect_info = (
[ $dsn, $user || '', $pass || '' ],
[ $dsn2, $user2 || '', $pass2 || '' ],
use Test::Exception;
use Scope::Guard ();
use Try::Tiny;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
-DBICTest::Schema->load_classes('EventSmallDT');
+my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_MSSQL_ODBC_${_}" } qw/DSN USER PASS/};
+my ($dsn2, $user2, $pass2) = @ENV{map { "DBICTEST_MSSQL_${_}" } qw/DSN USER PASS/};
+my ($dsn3, $user3, $pass3) = @ENV{map { "DBICTEST_MSSQL_ADO_${_}" } qw/DSN USER PASS/};
+
+plan skip_all => 'Test needs ' .
+ (join ' and ', map { $_ ? $_ : () }
+ DBIx::Class::Optional::Dependencies->req_missing_for('test_dt'),
+ (join ' or ', map { $_ ? $_ : () }
+ DBIx::Class::Optional::Dependencies->req_missing_for('test_rdbms_mssql_odbc'),
+ DBIx::Class::Optional::Dependencies->req_missing_for('test_rdbms_mssql_sybase'),
+ DBIx::Class::Optional::Dependencies->req_missing_for('test_rdbms_mssql_ado')))
+ unless
+ DBIx::Class::Optional::Dependencies->req_ok_for ('test_dt') && (
+ $dsn && DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_mssql_odbc')
+ or
+ $dsn2 && DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_mssql_sybase')
+ or
+ $dsn3 && DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_mssql_ado'))
+ or (not $dsn || $dsn2 || $dsn3);
# use this if you keep a copy of DBD::Sybase linked to FreeTDS somewhere else
BEGIN {
}
}
-my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_MSSQL_ODBC_${_}" } qw/DSN USER PASS/};
-my ($dsn2, $user2, $pass2) = @ENV{map { "DBICTEST_MSSQL_${_}" } qw/DSN USER PASS/};
-my ($dsn3, $user3, $pass3) = @ENV{map { "DBICTEST_MSSQL_ADO_${_}" } qw/DSN USER PASS/};
-
if (not ($dsn || $dsn2 || $dsn3)) {
plan skip_all =>
'Set $ENV{DBICTEST_MSSQL_ODBC_DSN} and/or $ENV{DBICTEST_MSSQL_DSN} and/or '
." 'track'.";
}
-plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_dt')
- unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_dt');
+DBICTest::Schema->load_classes('EventSmallDT');
my @connect_info = (
[ $dsn, $user, $pass ],
use Test::More;
use Test::Exception;
use Test::Warn;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
use DBICTest::Schema;
use Test::More;
use Test::Exception;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
+plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_oracle')
+ unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_oracle');
+
my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_ORA_${_}" } qw/DSN USER PASS/};
if (not ($dsn && $user && $pass)) {
'Warning: This test drops and creates a table called \'track\'';
}
-plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_oracle')
- unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_oracle');
-
# DateTime::Format::Oracle needs this set
$ENV{NLS_DATE_FORMAT} = 'DD-MON-YY';
$ENV{NLS_TIMESTAMP_FORMAT} = 'YYYY-MM-DD HH24:MI:SSXFF';
use Test::More;
use Test::Warn;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
use Test::More;
use Test::Exception;
use Scope::Guard ();
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_SQLANYWHERE_${_}" } qw/DSN USER PASS/};
my ($dsn2, $user2, $pass2) = @ENV{map { "DBICTEST_SQLANYWHERE_ODBC_${_}" } qw/DSN USER PASS/};
+plan skip_all => 'Test needs ' .
+ (join ' and ', map { $_ ? $_ : () }
+ DBIx::Class::Optional::Dependencies->req_missing_for('test_dt'),
+ (join ' or ', map { $_ ? $_ : () }
+ DBIx::Class::Optional::Dependencies->req_missing_for('test_rdbms_sqlanywhere'),
+ DBIx::Class::Optional::Dependencies->req_missing_for('test_rdbms_sqlanywhere_odbc')))
+ unless
+ DBIx::Class::Optional::Dependencies->req_ok_for ('test_dt') && (
+ $dsn && DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_sqlanywhere')
+ or
+ $dsn2 && DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_sqlanywhere_odbc'))
+ or (not $dsn || $dsn2);
+
if (not ($dsn || $dsn2)) {
plan skip_all => <<'EOF';
Set $ENV{DBICTEST_SQLANYWHERE_DSN} and/or $ENV{DBICTEST_SQLANYWHERE_ODBC_DSN}
EOF
}
-plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_dt')
- unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_dt');
-
my @info = (
[ $dsn, $user, $pass ],
[ $dsn2, $user2, $pass2 ],
use Test::Exception;
use Scope::Guard ();
use Try::Tiny;
+use DBIx::Class::Optional::Dependencies ();
use lib qw(t/lib);
use DBICTest;
-DBICTest::Schema->load_classes('EventSmallDT');
+plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_dt')
+. ' and ' .
+DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_ase')
+ unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_dt')
+ && DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_ase');
my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_SYBASE_${_}" } qw/DSN USER PASS/};
if (not ($dsn && $user)) {
plan skip_all =>
'Set $ENV{DBICTEST_SYBASE_DSN}, _USER and _PASS to run this test' .
- "\nWarning: This test drops and creates a table called 'track'";
+ "\nWarning: This test drops and creates a table called 'track' and " .
+ "'event_small_dt'";
}
-for (qw/test_rdbms_ase test_dt/) {
- plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ($_)
- unless DBIx::Class::Optional::Dependencies->req_ok_for ($_);
-}
+DBICTest::Schema->load_classes('EventSmallDT');
my @storage_types = (
'DBI::Sybase::ASE',
use Test::More;
use Test::Exception;
+use DBIx::Class::Optional::Dependencies ();
+
use lib qw(t/lib);
use DBICTest;
skip "Skipping $type tests without DBICTEST_${type}_DSN", 1
unless $ENV{"DBICTEST_${type}_DSN"};
+ if ($type eq 'PG') {
+ skip "skipping Pg tests without dependencies installed", 1
+ unless DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_pg');
+ }
+ elsif ($type eq 'MYSQL') {
+ skip "skipping MySQL tests without dependencies installed", 1
+ unless DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_mysql');
+ }
+
my $schema = DBICTest::Schema->connect (@ENV{map { "DBICTEST_${type}_${_}" } qw/DSN USER PASS/});
# emulate a singleton-factory, just cache the object *somewhere in a different package*
use Test::More;
use Test::Exception;
use Data::Dumper::Concise;
+use Try::Tiny;
use lib qw(t/lib);
use DBICTest;
next unless $dsn;
- my $schema = DBICTest::Schema->connect($dsn, $user, $pass, {
- quote_names => 1
- });
+ my $schema;
+
+ try {
+ $schema = DBICTest::Schema->connect($dsn, $user, $pass, {
+ quote_names => 1
+ });
+ $schema->storage->ensure_connected;
+ 1;
+ } || next;
my $expected_quote_char = $expected{$base_class}{quote_char};
my $quote_char_text = dumper($expected_quote_char);