Codebase list libdbix-class-perl / cd8e71b
Fix test failures with SQlite 3.37.0 In prior versions DBD::SQLite would preserve the case of data types as provided to the CREATE TABLE statement. This is no longer the case in newer versions, where INTEGERs seem to be normalized to upper case. Normalizing within DBIx::Class::Storage::DBI is not a viable approach as it will destabilize too many applications relying on roundtripping via ::Schema:Loader and the like. Just work around in tests with case-insensitive matches :/ gregor herrmann authored 2 years ago Peter Rabbitson committed 1 year, 11 months ago
3 changed file(s) with 10 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
00 Revision history for DBIx::Class
11
22 * Fixes
3 - Adjust tests to account for DBD::SQLite's column_info() no longer
4 being case-preserving in recent versions
35 - Fix t/storage/replicated.t relying on no-longer-available module
46 - Adjust t/53lean_startup.t to work around spurious changes in
57 Perl5 core (GH#143)
33 use Test::More;
44 use Test::Exception;
55 use Test::Warn;
6 use Test::Deep;
67 use lib qw(t/lib);
78 use DBICTest ':DiffSQL';
89
386387 $schema->source("Artist")->column_info_from_storage(1);
387388 $schema->source("Artist")->{_columns_info_loaded} = 0;
388389
389 is_deeply (
390 cmp_deeply (
390391 $schema->source('Artist')->columns_info,
391392 {
392393 artistid => {
409410 size => 100
410411 },
411412 rank => {
412 data_type => "integer",
413 data_type => re(qr/^integer$/i),
413414 default_value => 13,
414415 is_nullable => 0,
415416 size => undef
420421
421422 ok($schema->source("Artist")->{_columns_info_loaded} == 1, 'Columns info loaded flag set');
422423
423 is_deeply (
424 cmp_deeply (
424425 $schema->source('Artist')->columns_info([qw/artistid rank/]),
425426 {
426427 artistid => {
430431 size => undef
431432 },
432433 rank => {
433 data_type => "integer",
434 data_type => re(qr/^integer$/i),
434435 default_value => 13,
435436 is_nullable => 0,
436437 size => undef
11 use warnings;
22
33 use Test::More;
4 use Test::Deep;
45 use lib qw(t/lib);
56 use DBICTest;
67
4748 );
4849
4950 {
50 is_deeply (
51 cmp_deeply (
5152 get_storage_column_info ($schema->storage, 'artist', qw/size/),
5253 {
5354 'artistid' => {
5960 'is_nullable' => 1,
6061 },
6162 'rank' => {
62 'data_type' => 'integer',
63 'data_type' => re(qr/^integer$/i),
6364 'is_nullable' => 0,
6465 'default_value' => '13',
6566 },