[Bug 13457] New: Suggestions.t expects sample itemtypes
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 Bug ID: 13457 Summary: Suggestions.t expects sample itemtypes 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: mtompset@hotmail.com QA Contact: gmcharlt@gmail.com If you have more than the 8 default itemtypes, prove t/db_dependent/Suggestions.t fails. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |mtompset@hotmail.com Severity|enhancement |minor -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 --- Comment #1 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 34372 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34372&action=edit Bug 13457: Suggestions.t expects sample itemtypes TEST PLAN --------- 1) Make sure you have more than 8 item types, and preferably something with a non-sample default code for itemtypes. 2) prove t/db_dependent/Suggestions.t -- this will fail 3) Apply patch 4) prove t/db_dependent/Suggestions.t -- this will succeed 5) run koha qa test tools -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 Paola Rossi <paola.rossi@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |paola.rossi@cineca.it -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 Paola Rossi <paola.rossi@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34372|0 |1 is obsolete| | --- Comment #2 from Paola Rossi <paola.rossi@cineca.it> --- Created attachment 34429 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34429&action=edit Bug 13457: Suggestions.t expects sample itemtypes I've applied the patch against 3.19.00.000 Everything is OK as required. In detail of step 5) I saw: koha-qa.pl -v 2 -c 1 testing 1 commit(s) (applied to 5bdf460 'Bug 13425 - XSS in opac facets - Patc') Processing files before patches |========================>| 1 / 1 (100.00%) Processing files after patches |========================>| 1 / 1 (100.00%) OK t/db_dependent/Suggestions.t OK critic OK forbidden patterns OK pod OK valid So I pass the patch to "Signed Off" status. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #3 from Jonathan Druart <jonathan.druart@biblibre.com> --- The tests don't pass if you don't use the sample data. To me, this patch is not relevant: we should not create all data before launching tests. For instance the same test file (Suggestions.t) won't pass if you don't have the CPL branchcode and S categorycode. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Not sure if I understand what you mean. Wouldn't it be best if we made the UT independent of what's in the database? I think this patch is useful, as I often test with the default data, but may add new branches to it. So while it would be best to have complete data independence, this is at least a small step in the right direction. (In reply to Jonathan Druart from comment #3)
The tests don't pass if you don't use the sample data. To me, this patch is not relevant: we should not create all data before launching tests.
For instance the same test file (Suggestions.t) won't pass if you don't have the CPL branchcode and S categorycode.
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 Kyle M Hall <kyle@bywatersolutions.com> 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=13457 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34429|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 34575 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34575&action=edit [PASSED QA] Bug 13457: Suggestions.t expects sample itemtypes TEST PLAN --------- 1) Make sure you have more than 8 item types, and preferably something with a non-sample default code for itemtypes. 2) prove t/db_dependent/Suggestions.t -- this will fail 3) Apply patch 4) prove t/db_dependent/Suggestions.t -- this will succeed 5) run koha qa test tools Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #6 from M. Tompsett <mtompset@hotmail.com> --- Just tested by deleting CPL and S. Comment #3 requires another patch. Working on it. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 --- Comment #7 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 34595 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34595&action=edit Bug 13457 - Followup for CPL and S codes Based on comment #3, this corrects CPL and S issues if they do not exist in the DB. TEST PLAN --------- 0) Backup your DB. 1) Clear CPL and S from your DB. - delete from borrowers where categorycode='S'; - delete from categories where categorycode='S'; - delete from borrowers where branchcode='CPL'; - delete from branch where branchcode='CPL'; 2) prove t/db_dependent/Suggestions.t -- This should fail. 3) Apply patch 4) prove t/db_dependent/Suggestions.t -- This should work. 5) Intentionally add categorycode 'S' and branchcode 'CPL' back into the database. 6) prove t/db_dependent/Suggestions.t -- This should work. 7) run koha qa test tools. 8) Restore your DB :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 --- Comment #8 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Kyle M Hall from comment #4)
Not sure if I understand what you mean. Wouldn't it be best if we made the UT independent of what's in the database?
Yes, of course.
I think this patch is useful, as I often test with the default data, but may add new branches to it. So while it would be best to have complete data independence, this is at least a small step in the right direction.
I am not sure adding >20 lines per test file is a good idea. Especially because we will c/p the same lines. If we consider we need to create all data before writing one test, the tests will be more difficult to read than now. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 Paola Rossi <paola.rossi@cineca.it> 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=13457 Paola Rossi <paola.rossi@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34575|0 |1 is obsolete| | --- Comment #9 from Paola Rossi <paola.rossi@cineca.it> --- Created attachment 34827 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34827&action=edit [PASSED QA] Bug 13457: Suggestions.t expects sample itemtypes I've applied the patches against master 3.19.00.003 head 13252. Everything worked as required. I pass the patch to "Signed Off" status. ---------------------------------------------------------------------------- This was the error expected at step 2) (RIGHT, error as expected) prove t/db_dependent/Suggestions.t t/db_dependent/Suggestions.t .. 1/97 Can't call method "default_privacy" on an undefined value at [....]/C4/Members.pm line 874. # Looks like you planned 97 tests but ran 2. # Looks like your test exited with 255 just after 2. t/db_dependent/Suggestions.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 95/97 subtests Test Summary Report ------------------- t/db_dependent/Suggestions.t (Wstat: 65280 Tests: 2 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 97 tests but ran 2. Files=1, Tests=2, 1 wallclock secs ( 0.00 usr 0.03 sys + 0.40 cusr 0.71 csys = 1.14 CPU) Result: FAIL -------------------------------------------------------- This was the test required at the 4) and 6) steps (RIGHT): prove t/db_dependent/Suggestions.t t/db_dependent/Suggestions.t .. ok All tests successful. Files=1, Tests=97, 1 wallclock secs ( 0.00 usr 0.02 sys + 0.82 cusr 0.22 csys = 1.06 CPU) Result: PASS ---------------------------------------------------------------------------- -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 Paola Rossi <paola.rossi@cineca.it> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34595|0 |1 is obsolete| | --- Comment #10 from Paola Rossi <paola.rossi@cineca.it> --- Created attachment 34828 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34828&action=edit Bug 13457 - Followup for CPL and S codes -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34827|0 |1 is obsolete| | --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 34919 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34919&action=edit [PASSED QA] Bug 13457: Suggestions.t expects sample itemtypes TEST PLAN --------- 1) Make sure you have more than 8 item types, and preferably something with a non-sample default code for itemtypes. 2) prove t/db_dependent/Suggestions.t -- this will fail 3) Apply patch 4) prove t/db_dependent/Suggestions.t -- this will succeed 5) run koha qa test tools Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 34920 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=34920&action=edit [PASSED QA] Bug 13457 - Followup for CPL and S codes Based on comment #3, this corrects CPL and S issues if they do not exist in the DB. TEST PLAN --------- 0) Backup your DB. 1) Clear CPL and S from your DB. - delete from borrowers where categorycode='S'; - delete from categories where categorycode='S'; - delete from borrowers where branchcode='CPL'; - delete from branch where branchcode='CPL'; 2) prove t/db_dependent/Suggestions.t -- This should fail. 3) Apply patch 4) prove t/db_dependent/Suggestions.t -- This should work. 5) Intentionally add categorycode 'S' and branchcode 'CPL' back into the database. 6) prove t/db_dependent/Suggestions.t -- This should work. 7) run koha qa test tools. 8) Restore your DB :) Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de 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=13457 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34828|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- It's probably not the best solution, but I think it can be easily redone, once we figured out better ways. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 --- Comment #14 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Katrin Fischer from comment #13)
It's probably not the best solution, but I think it can be easily redone, once we figured out better ways.
IMO what we do now (only pass with specific data) is not perfect but better than the idea behind this patch (copy and paste the data insertion). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- So you feel it adds too much data? Sorry, not sure I understand yet! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Passed QA |Patch doesn't apply --- Comment #16 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Hi Mark, it doesn't seem to apply on my master branch. Could you please take a look? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 --- Comment #17 from Paola Rossi <paola.rossi@cineca.it> --- In master 3.19.00.006 t/db_dependent/Suggestions.t has 1 more line: use C4::Budgets; So the 2-nd patch would need to be rebased. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #34920|0 |1 is obsolete| | --- Comment #18 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 35254 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35254&action=edit [PASSED QA] Bug 13457 - Followup for CPL and S codes Based on comment #3, this corrects CPL and S issues if they do not exist in the DB. TEST PLAN --------- 0) Backup your DB. 1) Clear CPL and S from your DB. - delete from borrowers where categorycode='S'; - delete from categories where categorycode='S'; - delete from borrowers where branchcode='CPL'; - delete from branch where branchcode='CPL'; 2) prove t/db_dependent/Suggestions.t -- This should fail. 3) Apply patch 4) prove t/db_dependent/Suggestions.t -- This should work. 5) Intentionally add categorycode 'S' and branchcode 'CPL' back into the database. 6) prove t/db_dependent/Suggestions.t -- This should work. 7) run koha qa test tools. 8) Restore your DB :) Signed-off-by: Paola Rossi <paola.rossi@cineca.it> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Rebased. Paola Rossi's comment #17 was correct. Simple fix. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #19 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks Mark! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13457 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Status|Pushed to Master |Pushed to Stable --- Comment #20 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.18.x will be in 3.18.4 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org