X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F746db2_400.t;h=b6c43502cfd39a182c367aeba70cd1cf39e259c4;hb=8a684aeaa7dd3c6bd8c7e9a1ff7e8f5704c67a6d;hp=359c13ee2a588e4333e1f983d67ec166b5650213;hpb=3a4c1d89695fc181340e6eb5d469485798f067e7;p=dbsrgits%2FDBIx-Class.git diff --git a/t/746db2_400.t b/t/746db2_400.t index 359c13e..b6c4350 100644 --- a/t/746db2_400.t +++ b/t/746db2_400.t @@ -1,19 +1,17 @@ +use DBIx::Class::Optional::Dependencies -skip_all_without => 'test_rdbms_db2_400'; + use strict; -use warnings; +use warnings; use Test::More; +use DBIx::Class::Optional::Dependencies (); use lib qw(t/lib); use DBICTest; -my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_DB2_400_${_}" } qw/DSN USER PASS/}; - -#warn "$dsn $user $pass"; - # Probably best to pass the DBQ option in the DSN to specify a specific # libray. Something like: # DBICTEST_DB2_400_DSN='dbi:ODBC:dsn=MyAS400;DBQ=MYLIB' -plan skip_all => 'Set $ENV{DBICTEST_DB2_400_DSN}, _USER and _PASS to run this test' - unless ($dsn && $user); +my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_DB2_400_${_}" } qw/DSN USER PASS/}; plan tests => 6; @@ -72,7 +70,7 @@ my $test_type_info = { 'charfield' => { 'data_type' => 'CHAR', 'is_nullable' => 1, - 'size' => 10 + 'size' => 10 }, }; @@ -82,6 +80,7 @@ is_deeply($type_info, $test_type_info, 'columns_info_for - column data types'); # clean up our mess END { - my $dbh = eval { $schema->storage->_dbh }; - $dbh->do("DROP TABLE artist") if $dbh; + my $dbh = eval { $schema->storage->_dbh }; + $dbh->do("DROP TABLE artist") if $dbh; + undef $schema; }