Bug 15159 - TestBuilder behaviour on AI values should be tested
Summary: TestBuilder behaviour on AI values should be tested
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Galen Charlton
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-09 14:16 UTC by Tomás Cohen Arazi
Modified: 2016-06-21 21:40 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 15159: TestBuilder behaviour on AI values should be tested (2.26 KB, patch)
2015-11-09 14:20 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
[SIGNED-OFF]Bug 15159: TestBuilder behaviour on AI values should be tested (2.35 KB, patch)
2015-11-12 01:57 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
[PASSED QA] Bug 15159: TestBuilder behaviour on AI values should be tested (2.40 KB, patch)
2015-11-17 13:37 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2015-11-09 14:16:21 UTC
Currently, there is no test on TestBuilder's handling of AI values.
Comment 1 Tomás Cohen Arazi 2015-11-09 14:20:33 UTC Comment hidden (obsolete)
Comment 2 Héctor Eduardo Castro Avalos 2015-11-12 01:57:27 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2015-11-17 13:37:08 UTC
Created attachment 44910 [details] [review]
[PASSED QA] Bug 15159: TestBuilder behaviour on AI values should be tested

This patch introduces a test for t::lib::TestBuilder to check it
doesn't mess with AI values. As it is generating random values based
on the defined column type, chances are that it is creating the
AI values on its own, instead of letting the DB handle it.

This could be problematic of course. This test uses the 'biblio' table
by creating two values and checking their biblionumbers are consecutive.

To test:
- Apply the patch
- Run:
  $ prove t/db_dependent/TestBuilder.t -v
=> SUCCESS: The new tests are run and:
   - biblio.biblionumber is detected as an auto-increment column
   - generated biblionumbers are consecutive
- Sign off

Regards

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
All tests successful.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Tomás Cohen Arazi 2015-11-17 13:44:19 UTC
Patch pushed to master.