[Bug 15160] New: GetTopIssues.t should create random data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15160 Bug ID: 15160 Summary: GetTopIssues.t should create random data Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: tomascohen@gmail.com QA Contact: gmcharlt@gmail.com GetTopIssues.t currently creates fixed-value objects on the DB. If the id's it tries to use already exist on the DB it would fail. TestBuilder should take care of that. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15160 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15160
--- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> ---
Created attachment 44650
-->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44650&action=edit
Bug 15160: GetTopIssues.t should create random data
This patch refactors t/db_dependent/Circulation/GetTopIssues.t so it
creates its own data with random values. It does so by replacing (legacy)
SQL inserts and fixed value data inserting by TestBuilder generated data.
There is no expected behaviour change.
To test:
- Create an itemtyp directly on your DB with GTI_I_TEST as its itemtype
> INSERT INTO itemtypes (itemtype) VALUES ('GTI_I_TEST');
- Run:
$ prove t/db_dependent/Circulation/GetTopIssues.t
=> FAIL: The insert line fails
- Apply the patch
- Run:
$ prove t/db_dependent/Circulation/GetTopIssues.t
=> SUCCESS: tests pass due to random data usage.
- Sign off
--
You are receiving this mail because:
You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15160 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15160
Frédéric Demians <frederic@tamil.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #44650|0 |1
is obsolete| |
--- Comment #2 from Frédéric Demians <frederic@tamil.fr> ---
Created attachment 44683
-->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44683&action=edit
Bug 15160: GetTopIssues.t should create random data
This patch refactors t/db_dependent/Circulation/GetTopIssues.t so it
creates its own data with random values. It does so by replacing (legacy)
SQL inserts and fixed value data inserting by TestBuilder generated data.
There is no expected behaviour change.
To test:
- Create an itemtyp directly on your DB with GTI_I_TEST as its itemtype
> INSERT INTO itemtypes (itemtype) VALUES ('GTI_I_TEST');
- Run:
$ prove t/db_dependent/Circulation/GetTopIssues.t
=> FAIL: The insert line fails
- Apply the patch
- Run:
$ prove t/db_dependent/Circulation/GetTopIssues.t
=> SUCCESS: tests pass due to random data usage.
- Sign off
Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Test plan produces the expected result, failing, then OK.
--
You are receiving this mail because:
You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15160 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15160
Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #44683|0 |1
is obsolete| |
--- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> ---
Created attachment 44687
-->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44687&action=edit
Bug 15160: GetTopIssues.t should create random data
This patch refactors t/db_dependent/Circulation/GetTopIssues.t so it
creates its own data with random values. It does so by replacing (legacy)
SQL inserts and fixed value data inserting by TestBuilder generated data.
There is no expected behaviour change.
To test:
- Create an itemtyp directly on your DB with GTI_I_TEST as its itemtype
> INSERT INTO itemtypes (itemtype) VALUES ('GTI_I_TEST');
- Run:
$ prove t/db_dependent/Circulation/GetTopIssues.t
=> FAIL: The insert line fails
- Apply the patch
- Run:
$ prove t/db_dependent/Circulation/GetTopIssues.t
=> SUCCESS: tests pass due to random data usage.
- Sign off
Signed-off-by: Frederic Demians <f.demians@tamil.fr>
Test plan produces the expected result, failing, then OK.
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
--
You are receiving this mail because:
You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15160 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Passed QA |Pushed to Master --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org