Bug 17759: Remove invalid guarantorid's in Members.t
commit2820755f153c19107d8c1e67371941b42ab901d2
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 12 Dec 2016 12:48:40 +0000 (12 13:48 +0100)
committerKatrin Fischer <katrin.fischer.83@web.de>
Sun, 18 Dec 2016 19:36:32 +0000 (18 19:36 +0000)
tree92eb95c40d097d33bb2dad85f27ec33b9d1c55c5
parent45bd59064f117f984b4bc041c12136a7d6a880c5
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>
(cherry picked from commit 82d75e124e416aef13f11d43837438799bd850dd)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
t/db_dependent/Members.t