From: Peter Rabbitson Date: Fri, 14 Aug 2015 03:31:52 +0000 (+0100) Subject: Fix failing tests with DBICTEST_SYBASE_DSN set X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=619f81c4e80407520781678162e020ca8d7bf0ef;p=dbsrgits%2FDBIx-Class-Historic.git Fix failing tests with DBICTEST_SYBASE_DSN set t/746sybase.t - broken by 2a6dda4b t/storage/quote_names.t - implicitly broken by an oversight in f9b5239a Sigh --- diff --git a/Changes b/Changes index c1e5aa1..7508778 100644 --- a/Changes +++ b/Changes @@ -25,6 +25,8 @@ Revision history for DBIx::Class - Fix t/52leaks.t failures on compilerless systems (RT#104429) - Fix t/storage/quote_names.t failures on systems with specified Oracle test credentials while missing the optional Math::Base36 + - Fix test failures when DBICTEST_SYBASE_DSN is set (unnoticed change + in error message wording during 0.082800 and a bogus test) * Misc - Skip tests in a way more intelligent and speedy manner when optional diff --git a/t/746sybase.t b/t/746sybase.t index d4588c5..540ca78 100644 --- a/t/746sybase.t +++ b/t/746sybase.t @@ -268,18 +268,23 @@ SQL # test invalid _insert_bulk (missing required column) # -# There should be a rollback, reconnect and the next valid _insert_bulk should -# succeed. throws_ok { $schema->resultset('Artist')->populate([ { charfield => 'foo', } ]); - } qr/no value or default|does not allow null|placeholders/i, + } # The second pattern is the error from fallback to regular array insert on # incompatible charset. # The third is for ::NoBindVars with no syb_has_blk. + qr/ + \Qno value or default\E + | + \Qdoes not allow null\E + | + \QUnable to invoke fast-path insert without storage placeholder support\E + /xi, '_insert_bulk with missing required column throws error'; # now test _insert_bulk with IDENTITY_INSERT diff --git a/t/storage/quote_names.t b/t/storage/quote_names.t index a4bcefa..bf46122 100644 --- a/t/storage/quote_names.t +++ b/t/storage/quote_names.t @@ -128,8 +128,12 @@ for my $db (sort { "$db name_sep with quote_names => 1 is $name_sep_text"; # if something was produced - it better be quoted - if ( my $ddl = try { $schema->deployment_statements } ) { - + if ( + # the SQLT producer has no idea what quotes are :/ + $db ne 'SYBASE' + and + my $ddl = try { $schema->deployment_statements } + ) { my $quoted_artist = $sql_maker->_quote('artist'); like ($ddl, qr/^CREATE\s+TABLE\s+\Q$quoted_artist/msi, "$db DDL contains expected quoted table name");