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
0 | 0 |
Revision history for DBIx::Class
|
1 | 1 |
|
2 | 2 |
* Fixes
|
|
3 |
- Adjust tests to account for DBD::SQLite's column_info() no longer
|
|
4 |
being case-preserving in recent versions
|
3 | 5 |
- Fix t/storage/replicated.t relying on no-longer-available module
|
4 | 6 |
- Adjust t/53lean_startup.t to work around spurious changes in
|
5 | 7 |
Perl5 core (GH#143)
|
3 | 3 |
use Test::More;
|
4 | 4 |
use Test::Exception;
|
5 | 5 |
use Test::Warn;
|
|
6 |
use Test::Deep;
|
6 | 7 |
use lib qw(t/lib);
|
7 | 8 |
use DBICTest ':DiffSQL';
|
8 | 9 |
|
|
386 | 387 |
$schema->source("Artist")->column_info_from_storage(1);
|
387 | 388 |
$schema->source("Artist")->{_columns_info_loaded} = 0;
|
388 | 389 |
|
389 | |
is_deeply (
|
|
390 |
cmp_deeply (
|
390 | 391 |
$schema->source('Artist')->columns_info,
|
391 | 392 |
{
|
392 | 393 |
artistid => {
|
|
409 | 410 |
size => 100
|
410 | 411 |
},
|
411 | 412 |
rank => {
|
412 | |
data_type => "integer",
|
|
413 |
data_type => re(qr/^integer$/i),
|
413 | 414 |
default_value => 13,
|
414 | 415 |
is_nullable => 0,
|
415 | 416 |
size => undef
|
|
420 | 421 |
|
421 | 422 |
ok($schema->source("Artist")->{_columns_info_loaded} == 1, 'Columns info loaded flag set');
|
422 | 423 |
|
423 | |
is_deeply (
|
|
424 |
cmp_deeply (
|
424 | 425 |
$schema->source('Artist')->columns_info([qw/artistid rank/]),
|
425 | 426 |
{
|
426 | 427 |
artistid => {
|
|
430 | 431 |
size => undef
|
431 | 432 |
},
|
432 | 433 |
rank => {
|
433 | |
data_type => "integer",
|
|
434 |
data_type => re(qr/^integer$/i),
|
434 | 435 |
default_value => 13,
|
435 | 436 |
is_nullable => 0,
|
436 | 437 |
size => undef
|
1 | 1 |
use warnings;
|
2 | 2 |
|
3 | 3 |
use Test::More;
|
|
4 |
use Test::Deep;
|
4 | 5 |
use lib qw(t/lib);
|
5 | 6 |
use DBICTest;
|
6 | 7 |
|
|
47 | 48 |
);
|
48 | 49 |
|
49 | 50 |
{
|
50 | |
is_deeply (
|
|
51 |
cmp_deeply (
|
51 | 52 |
get_storage_column_info ($schema->storage, 'artist', qw/size/),
|
52 | 53 |
{
|
53 | 54 |
'artistid' => {
|
|
59 | 60 |
'is_nullable' => 1,
|
60 | 61 |
},
|
61 | 62 |
'rank' => {
|
62 | |
'data_type' => 'integer',
|
|
63 |
'data_type' => re(qr/^integer$/i),
|
63 | 64 |
'is_nullable' => 0,
|
64 | 65 |
'default_value' => '13',
|
65 | 66 |
},
|