]> git.koha-community.org Git - koha.git/commit
Bug 17759: Remove invalid guarantorid's in Members.t
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 12 Dec 2016 12:48:40 +0000 (13:48 +0100)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 16 Dec 2016 11:25:37 +0000 (11:25 +0000)
commit82d75e124e416aef13f11d43837438799bd850dd
treed42c795ba6969c7152734c8c87eda8d054ee1cbf
parenta1592ec10be56569b64774a3dde1e85c53ba36d9
Bug 17759: Remove invalid guarantorid's in Members.t

See also bug 17733. As long as we have no FK, these invalid guarantorid's
can make tests fail.
Adding a sql statement to clear them in the beginning of the test.

Test plan:
[1] Since it seems that AUTO_INC+8, +9 and +10 may fail one or two tests,
    we should manipulate one or two borrowers:
    Run this SQL query first:
SELECT `AUTO_INCREMENT` FROM  INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = '[your database]' and table_name='borrowers';
    Now run: UPDATE borrowers SET guarantorid=[former value + 8] WHERE borrowernumber=[some existing borrowernumber]
[2] Without this patch, run Members.t. Should fail two tests.
[3] Apply the patch. Fetch the new AUTO_INCREMENT value and update
    guarantorid accordingly again for the manipulated borrower.
[4] Run the test. It should not fail.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
t/db_dependent/Members.t