Bugzilla – Attachment 58006 Details for
Bug 17733
Members.t is still failing randomly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Bug 17733: Fix Members.t
SIGNED-OFF-Bug-17733-Fix-Memberst.patch (text/plain), 1.51 KB, created by
Katrin Fischer
on 2016-12-06 20:09:49 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 17733: Fix Members.t
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-12-06 20:09:49 UTC
Size:
1.51 KB
patch
obsolete
>From 171e18b1e7a6a610a2b3d5f67e8424c78e5cc468 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 6 Dec 2016 17:09:21 +0100 >Subject: [PATCH] [SIGNED OFF] Bug 17733: Fix Members.t > >In some dirty DB (Jenkins), the borrowers.guarantorid field is not set >to a valid patron id. >That make some tests fail if we create a patron with that patron id. > >In my DB, auto increment for borrowers is set to 52 before the tests >On the 4th run of the tests, some tests fail. >Before I got a patron with a guarantorid=112 (I let you do the math). > >Test plan: >The easiest is to trust me > >Todo: Add a FK! >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > t/db_dependent/Members.t | 5 +++++ > 1 file changed, 5 insertions(+) > >diff --git a/t/db_dependent/Members.t b/t/db_dependent/Members.t >index 998c64f..df309f3 100755 >--- a/t/db_dependent/Members.t >+++ b/t/db_dependent/Members.t >@@ -294,6 +294,11 @@ $builder->build({ > }, > }); > >+# In some dirty DB, the guarantorid is set to a non existent patron id >+# If we pick it, then the tests will fail >+# This should not be needed, we should have a FK on the guarantorid instead >+Koha::Patrons->search({ guarantorid => { -in => [ $borrower1->{borrowernumber}, $borrower2->{borrowernumber} ] }})->update({ guarantorid => undef }); >+ > my $owner = AddMember (categorycode => 'STAFFER', branchcode => $library2->{branchcode} ); > my $list1 = AddPatronList( { name => 'Test List 1', owner => $owner } ); > my @listpatrons = ($bor1inlist, $bor2inlist); >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17733
:
58005
|
58006
|
58111