From: Peter Rabbitson Date: Fri, 14 Aug 2015 03:31:52 +0000 (+0100) Subject: Fix failing tests with DBICTEST_SYBASE_DSN set X-Git-Tag: v0.082821~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5f179c3f8dc19f113449f3f4fa26a89beb227f14;p=dbsrgits%2FDBIx-Class.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 bd26cab..12334fa 100644 --- a/Changes +++ b/Changes @@ -4,6 +4,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) 0.082820 2015-03-20 20:35 (UTC) * Fixes diff --git a/t/746sybase.t b/t/746sybase.t index af1f7a3..7e0b47f 100644 --- a/t/746sybase.t +++ b/t/746sybase.t @@ -276,18 +276,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");