[Bug 17716] New: Remove itemtype-related t/db_dependent/ CourseReserves.t warnings
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17716 Bug ID: 17716 Summary: Remove itemtype-related t/db_dependent/CourseReserves.t warnings Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: tomascohen@gmail.com QA Contact: gmcharlt@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17716 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 57938 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57938&action=edit Bug 17716: Remove itemtype-related t/db_dependent/CourseReserves.t This patch makes t/db_dependent/CourseReserves.t create good sample data for its tests. It does so by creating a random itemtype. To test: - Run $ prove t/db_dependent/CourseReserves.t => FAIL: lots of warnings about "item-level_itypes set but no itemtype set for item" - Apply the patch - Run: $ prove t/db_dependent/CourseReserves.t => SUCCESS: Tests are green, and no warnings. - Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17716 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 57939 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57939&action=edit Bug 17716: (followup) Remove dep on existing data and tidy This patch removes the requirement for this tests for the DB to include at least 10 borrowers to pass. Borrowers are now created on each run using t::lib::TestBuilder and a loop. Bonus: some tiny changes to tidy the file. To test: - Run: $ prove t/db_dependent/CourseReserves.t SUCCESS => Tests pass with and without the patch. - Sign off :-D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17716 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17716 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17716 --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Comment on attachment 57939 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57939 Bug 17716: (followup) Remove dep on existing data and tidy Review of attachment 57939: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=17716&attachment=57939) ----------------------------------------------------------------- ::: t/db_dependent/CourseReserves.t @@ -36,5 @@
-# Create the item -my $record = MARC::Record->new(); -$record->append_fields( - MARC::Field->new( '952', '0', '0', a => $library->{branchcode}, b => $library->{branchcode} ) -);
Wow. That's strange adding an empty item, but then calling AddItem 2 lines later. Nice catch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17716 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57938|0 |1 is obsolete| | --- Comment #4 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 57941 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57941&action=edit [SIGNED-OFF] Bug 17716: Remove itemtype-related t/db_dependent/CourseReserves.t This patch makes t/db_dependent/CourseReserves.t create good sample data for its tests. It does so by creating a random itemtype. To test: - Run $ prove t/db_dependent/CourseReserves.t => FAIL: lots of warnings about "item-level_itypes set but no itemtype set for item" - Apply the patch - Run: $ prove t/db_dependent/CourseReserves.t => SUCCESS: Tests are green, and no warnings. - Sign off :-D Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17716 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57939|0 |1 is obsolete| | --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 57942 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57942&action=edit [SIGNED-OFF] Bug 17716: (followup) Remove dep on existing data and tidy This patch removes the requirement for this tests for the DB to include at least 10 borrowers to pass. Borrowers are now created on each run using t::lib::TestBuilder and a loop. Bonus: some tiny changes to tidy the file. To test: - Run: $ prove t/db_dependent/CourseReserves.t SUCCESS => Tests pass with and without the patch. - Sign off :-D Signed-off-by: Mark Tompsett <mtompset@hotmail.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17716 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |mtompset@hotmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17716 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17716 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #57941|0 |1 is obsolete| | Attachment #57942|0 |1 is obsolete| | --- Comment #6 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 57960 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57960&action=edit Bug 17716: Remove itemtype-related t/db_dependent/CourseReserves.t This patch makes t/db_dependent/CourseReserves.t create good sample data for its tests. It does so by creating a random itemtype. To test: - Run $ prove t/db_dependent/CourseReserves.t => FAIL: lots of warnings about "item-level_itypes set but no itemtype set for item" - Apply the patch - Run: $ prove t/db_dependent/CourseReserves.t => SUCCESS: Tests are green, and no warnings. - Sign off :-D Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17716 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 57961 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=57961&action=edit Bug 17716: (followup) Remove dep on existing data and tidy This patch removes the requirement for this tests for the DB to include at least 10 borrowers to pass. Borrowers are now created on each run using t::lib::TestBuilder and a loop. Bonus: some tiny changes to tidy the file. To test: - Run: $ prove t/db_dependent/CourseReserves.t SUCCESS => Tests pass with and without the patch. - Sign off :-D Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17716 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks Tomas! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17716 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Status|Pushed to Master |Pushed to Stable --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- These patches have been pushed to 16.11.x, will be in 16.11.01. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org