X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Frun%2F145db2.tl;h=36e5e8c96085e5eb5d922703e25bf028b1d36c89;hb=70350518bbb31e5ac22fb3cb73d3e17409fcd332;hp=aa721b1e7ec1f6cbaf32ffeda2dac9cd04c96132;hpb=fc22fbac7c99f1ee8a52e529a6ce4ee35fd5d4a9;p=dbsrgits%2FDBIx-Class.git diff --git a/t/run/145db2.tl b/t/run/145db2.tl index aa721b1..36e5e8c 100644 --- a/t/run/145db2.tl +++ b/t/run/145db2.tl @@ -1,5 +1,9 @@ -sub run_tests { -my $schema = shift; +use strict; +use warnings; + +use Test::More; +use lib qw(t/lib); +use DBICTest; my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_DB2_${_}" } qw/DSN USER PASS/}; @@ -14,10 +18,7 @@ DBICTest::Schema->compose_connection('DB2Test' => $dsn, $user, $pass); my $dbh = DB2Test->schema->storage->dbh; -{ - local $SIG{__WARN__} = sub {}; - $dbh->do("DROP TABLE artist;"); -} +$dbh->do("DROP TABLE artist", { RaiseError => 0, PrintError => 0 }); $dbh->do("CREATE TABLE artist (artistid INTEGER GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), name VARCHAR(255), charfield CHAR(10));"); @@ -71,6 +72,3 @@ is_deeply($type_info, $test_type_info, 'columns_info_for - column data types'); # clean up our mess $dbh->do("DROP TABLE artist"); -} - -1;