summary refs log tree commit diff
diff options
context:
space:
mode:
authoraszlig <aszlig@redmoonstudios.org>2014-04-22 16:22:54 +0200
committeraszlig <aszlig@redmoonstudios.org>2014-04-22 16:27:28 +0200
commit52769d5c17935b99bcb78c16fa02c3c48dc0ae18 (patch)
tree462816c35df215bd2fde88f433d243582d2a09f0
parent1b2b9761b4e1da51a8905807a3e6d487a92f3c8b (diff)
downloadnixlib-52769d5c17935b99bcb78c16fa02c3c48dc0ae18.tar
nixlib-52769d5c17935b99bcb78c16fa02c3c48dc0ae18.tar.gz
nixlib-52769d5c17935b99bcb78c16fa02c3c48dc0ae18.tar.bz2
nixlib-52769d5c17935b99bcb78c16fa02c3c48dc0ae18.tar.lz
nixlib-52769d5c17935b99bcb78c16fa02c3c48dc0ae18.tar.xz
nixlib-52769d5c17935b99bcb78c16fa02c3c48dc0ae18.tar.zst
nixlib-52769d5c17935b99bcb78c16fa02c3c48dc0ae18.zip
perl-dbix-class: Fix tests with newer SQLite.
Our version of SQLite causes the tests to fail, so I'm hereby adding a
patch from dbsrgits/dbix-class@ed5550d36 with the hunk for the Changes
file dropped.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
-rw-r--r--pkgs/development/perl-modules/dbix-class-fix-tests.patch52
-rw-r--r--pkgs/top-level/perl-packages.nix1
2 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/development/perl-modules/dbix-class-fix-tests.patch b/pkgs/development/perl-modules/dbix-class-fix-tests.patch
new file mode 100644
index 000000000000..476a159f621f
--- /dev/null
+++ b/pkgs/development/perl-modules/dbix-class-fix-tests.patch
@@ -0,0 +1,52 @@
+diff --git a/t/multi_create/standard.t b/t/multi_create/standard.t
+index 5a02947..6c1efd8 100644
+--- a/t/multi_create/standard.t
++++ b/t/multi_create/standard.t
+@@ -444,7 +444,11 @@ throws_ok ( sub {
+     #$t->cd($t->new_related('cd', { artist => undef } ) );
+     #$t->{_rel_in_storage} = 0;
+     $t->insert;
+-}, qr/cd.artist may not be NULL/, "Exception propogated properly");
++}, qr/DBI Exception.+(?x:
++    \QNOT NULL constraint failed: cd.artist\E
++      |
++    \Qcd.artist may not be NULL\E
++)/s, "Exception propogated properly");
+ 
+ lives_ok ( sub {
+   $schema->resultset('CD')->create ({
+diff --git a/t/relationship/update_or_create_multi.t b/t/relationship/update_or_create_multi.t
+index 8710048..c7cce7a 100644
+--- a/t/relationship/update_or_create_multi.t
++++ b/t/relationship/update_or_create_multi.t
+@@ -69,7 +69,12 @@ throws_ok {
+     year => 2020,
+     title => 'the best thing since sliced bread',
+   })
+-} qr/\Qcd.artist may not be NULL/, 'ambiguous find + create failed';
++} qr/DBI Exception.+(?x:
++    \QNOT NULL constraint failed: cd.artist\E
++      |
++    \Qcd.artist may not be NULL\E
++)/s, 'ambiguous find + create failed'
++;
+ 
+ # expect a create, after a failed search using *only* the
+ # *current* relationship and the unique column constraints
+diff --git a/t/storage/error.t b/t/storage/error.t
+index d5980eb..61d6782 100644
+--- a/t/storage/error.t
++++ b/t/storage/error.t
+@@ -15,7 +15,11 @@ warnings_are ( sub {
+     sub {
+       $schema->resultset('CD')->create({ title => 'vacation in antarctica' })
+     },
+-    qr/DBI Exception.+cd\.artist.+NULL/s
++    qr/DBI Exception.+(?x:
++      \QNOT NULL constraint failed: cd.artist\E
++        |
++      \Qcd.artist may not be NULL\E
++    )/s
+   );  # as opposed to some other error
+ }, [], 'No warnings besides exception' );
+ 
diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix
index ad5a5bf9fed6..bbea59005f6d 100644
--- a/pkgs/top-level/perl-packages.nix
+++ b/pkgs/top-level/perl-packages.nix
@@ -2309,6 +2309,7 @@ let self = _self // overrides; _self = with self; {
       url = mirror://cpan/authors/id/R/RI/RIBASUSHI/DBIx-Class-0.08250.tar.gz;
       sha256 = "0nsqvj34klc9pf4l5kj3nqkq7agbsn11ys4115100awf7gxjbad6";
     };
+    patches = [ ../development/perl-modules/dbix-class-fix-tests.patch ];
     buildInputs = [ DBDSQLite PackageStash TestException TestWarn TestDeep ];
     propagatedBuildInputs = [ ClassAccessorGrouped ClassC3Componentised ClassInspector ClassMethodModifiers ConfigAny ContextPreserve DataCompare DataDumperConcise DataPage DBI DevelGlobalDestruction HashMerge ModuleFind Moo MROCompat namespaceclean PathClass ScopeGuard SQLAbstract strictures SubName TryTiny ];
     meta = {