[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 --- Comment #25 from Jonathan Druart jonathan.dru...@biblibre.com --- (In reply to comment #24) I think this is the way to go. Perhaps we could use MyTAP (http://theory.github.io/mytap/) as a framework for this. Hi Galen, Yes maybe. But as I said in my mail (see comment 15), the first step is that all unit tests pass on any instance. They could be improved later. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 --- Comment #27 from Galen Charlton gmcha...@gmail.com --- Created attachment 19128 -- http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19128action=edit Bug 10332: Data could exist in the courses table. Signed-off-by: Kyle M Hall k...@bywatersolutions.com Signed-off-by: Galen Charlton g...@esilibrary.com -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 Galen Charlton gmcha...@gmail.com changed: What|Removed |Added Status|Passed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 Galen Charlton gmcha...@gmail.com changed: What|Removed |Added Attachment #19077|0 |1 is obsolete|| Attachment #19078|0 |1 is obsolete|| --- Comment #26 from Galen Charlton gmcha...@gmail.com --- Created attachment 19127 -- http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19127action=edit Bug 10332: CourseReserves.t needs to create its own data prove t/db_dependent/CourseReserves.t t/db_dependent/CourseReserves.t .. ok All tests successful. Files=1, Tests=20, 2 wallclock secs ( 0.02 usr 0.00 sys + 0.43 cusr 0.03 csys = 0.48 CPU) Result: PASS Signed-off-by: Jared Camins-Esakov jcam...@cpbibliography.com Without correct data, test fails prior to patch, passes no matter what after patch is applied. Signed-off-by: Kyle M Hall k...@bywatersolutions.com Signed-off-by: Galen Charlton g...@esilibrary.com -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 --- Comment #28 from Galen Charlton gmcha...@gmail.com --- Created attachment 19129 -- http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19129action=edit Bug 10332: further improvements to course reserves tests - Wrap tests in a database transaction; that way, no special cleanup code is required - Use AddItem rather than AddItemFromMarc to create test items; there's no need to build in a dependence on any particular MARC flavor or framework in our test cases (except, of course, for test cases that are explicitly exercising code that involves the frameworks). Signed-off-by: Galen Charlton g...@esilibrary.com -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 --- Comment #29 from Galen Charlton gmcha...@gmail.com --- (In reply to comment #25) Yes maybe. But as I said in my mail (see comment 15), the first step is that all unit tests pass on any instance. They could be improved later. No, they can be improved now! :) I've attached a follow-up that wraps the test cases in a transaction and removes the cleanup code that is now unnecessary as a consequence. The follow-up also uses AddItem rather than AddItemFromMarc, on the theory that it would be nice if most/all of the test cases can pass regardless of MARC flavor. Setting back to signed-off pending QA review of my follow-up. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 Jonathan Druart jonathan.dru...@biblibre.com changed: What|Removed |Added Status|Signed Off |Passed QA --- Comment #30 from Jonathan Druart jonathan.dru...@biblibre.com --- Galen, thanks it is a great and easy improvement! -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 Jonathan Druart jonathan.dru...@biblibre.com changed: What|Removed |Added Attachment #19129|0 |1 is obsolete|| --- Comment #31 from Jonathan Druart jonathan.dru...@biblibre.com --- Created attachment 19135 -- http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19135action=edit Bug 10332: further improvements to course reserves tests - Wrap tests in a database transaction; that way, no special cleanup code is required - Use AddItem rather than AddItemFromMarc to create test items; there's no need to build in a dependence on any particular MARC flavor or framework in our test cases (except, of course, for test cases that are explicitly exercising code that involves the frameworks). Signed-off-by: Galen Charlton g...@esilibrary.com Signed-off-by: Jonathan Druart jonathan.dru...@biblibre.com -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 Galen Charlton gmcha...@gmail.com changed: What|Removed |Added Status|Passed QA |Pushed to Master --- Comment #32 from Galen Charlton gmcha...@gmail.com --- Pushed to master. Thanks, Jonathan and Kyle! -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 --- Comment #15 from Jonathan Druart jonathan.dru...@biblibre.com --- (In reply to comment #13) Test 10 at the least may fail if there is any data already in the courses table. This patch removes the truncations that ensure the tables are empty. Yes, good catch. I will provide a followup. We could require an empty table but it is a useless restriction. (In reply to comment #14) If we required the tables to be empty, would that mean that you could never run the test on a installation where you have played around with course reserves? It agrees with bug 10273, bug 10337 and my mail on koha-devel (subject: Where are we on unit tests?, date: June, 4th 2013 16:53). -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 Jonathan Druart jonathan.dru...@biblibre.com changed: What|Removed |Added Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 --- Comment #16 from Jonathan Druart jonathan.dru...@biblibre.com --- Created attachment 19058 -- http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19058action=edit Bug 10332: Data could exist in the courses table. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 Jonathan Druart jonathan.dru...@biblibre.com changed: What|Removed |Added Attachment #19058|0 |1 is obsolete|| --- Comment #17 from Jonathan Druart jonathan.dru...@biblibre.com --- Created attachment 19059 -- http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19059action=edit Bug 10332: Data could exist in the courses table. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 --- Comment #18 from Kyle M Hall k...@bywatersolutions.com --- Thanks for the followup Jonathan! Everything looks, except koha-qa.pl fail because there is no use strict ( or use Modern::Perl ). Could you amend your followup to include one of those. After that I think it will be good to pass QA! FAIL t/db_dependent/CourseReserves.t OK pod OK forbidden patterns OK valid FAIL critic # TestingAndDebugging::RequireUseStrict: Got 1 violation(s). -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 --- Comment #19 from Jonathan Druart jonathan.dru...@biblibre.com --- (In reply to comment #18) Thanks for the followup Jonathan! Everything looks, except koha-qa.pl fail because there is no use strict ( or use Modern::Perl ). Could you amend your followup to include one of those. After that I think it will be good to pass QA! FAIL t/db_dependent/CourseReserves.t OK pod OK forbidden patterns OK valid FAIL critic # TestingAndDebugging::RequireUseStrict: Got 1 violation(s). Kyle, Looks good here: $ qa -c 2 -v 2 testing 2 commit(s) (applied to 77a5e3e 'Bug 10439: fix bug preventing the lib') OKt/db_dependent/CourseReserves.t OK pod OK forbidden patterns OK valid OK critic the file contains use Modern::Perl;. Your t/perlcriticrc (Koha src) file should contain [TestingAndDebugging::RequireUseStrict] equivalent_modules = Modern::Perl [TestingAndDebugging::RequireUseWarnings] equivalent_modules = Modern::Perl Maybe your qa tools repository is not up-to-date. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 --- Comment #20 from Kyle M Hall k...@bywatersolutions.com --- I bet you're right. Thanks! Kyle (In reply to comment #19) (In reply to comment #18) Thanks for the followup Jonathan! Everything looks, except koha-qa.pl fail because there is no use strict ( or use Modern::Perl ). Could you amend your followup to include one of those. After that I think it will be good to pass QA! FAIL t/db_dependent/CourseReserves.t OK pod OK forbidden patterns OK valid FAIL critic # TestingAndDebugging::RequireUseStrict: Got 1 violation(s). Kyle, Looks good here: $ qa -c 2 -v 2 testing 2 commit(s) (applied to 77a5e3e 'Bug 10439: fix bug preventing the lib') OK t/db_dependent/CourseReserves.t OK pod OK forbidden patterns OK valid OK critic the file contains use Modern::Perl;. Your t/perlcriticrc (Koha src) file should contain [TestingAndDebugging::RequireUseStrict] equivalent_modules = Modern::Perl [TestingAndDebugging::RequireUseWarnings] equivalent_modules = Modern::Perl Maybe your qa tools repository is not up-to-date. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 M. de Rooy m.de.r...@rijksmuseum.nl changed: What|Removed |Added CC||m.de.r...@rijksmuseum.nl --- Comment #21 from M. de Rooy m.de.r...@rijksmuseum.nl --- (In reply to comment #20) Maybe your qa tools repository is not up-to-date. Could be the perlcritic version too.. Version 1.116 warns about Modern Perl :) -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 --- Comment #23 from Kyle M Hall k...@bywatersolutions.com --- Created attachment 19078 -- http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19078action=edit Bug 10332: Data could exist in the courses table. Signed-off-by: Kyle M Hall k...@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 Kyle M Hall k...@bywatersolutions.com changed: What|Removed |Added Attachment #18645|0 |1 is obsolete|| Attachment #19059|0 |1 is obsolete|| --- Comment #22 from Kyle M Hall k...@bywatersolutions.com --- Created attachment 19077 -- http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19077action=edit Bug 10332: CourseReserves.t needs to create its own data prove t/db_dependent/CourseReserves.t t/db_dependent/CourseReserves.t .. ok All tests successful. Files=1, Tests=20, 2 wallclock secs ( 0.02 usr 0.00 sys + 0.43 cusr 0.03 csys = 0.48 CPU) Result: PASS Signed-off-by: Jared Camins-Esakov jcam...@cpbibliography.com Without correct data, test fails prior to patch, passes no matter what after patch is applied. Signed-off-by: Kyle M Hall k...@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 Kyle M Hall k...@bywatersolutions.com changed: What|Removed |Added Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 Kyle M Hall k...@bywatersolutions.com changed: What|Removed |Added Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 Galen Charlton gmcha...@gmail.com changed: What|Removed |Added CC||gmcha...@gmail.com --- Comment #24 from Galen Charlton gmcha...@gmail.com --- (In reply to comment #9) I know this is not the right forum to raise the topic, but I've done worse things in my life: When I do this kind of testing, I do it within a transaction, and rollback at the end. That way I do not need to think about a proper cleanup. Has there been any thoughts on that subject? I think this is the way to go. Perhaps we could use MyTAP (http://theory.github.io/mytap/) as a framework for this. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 Katrin Fischer katrin.fisc...@bsz-bw.de changed: What|Removed |Added CC||katrin.fisc...@bsz-bw.de --- Comment #14 from Katrin Fischer katrin.fisc...@bsz-bw.de --- If we required the tables to be empty, would that mean that you could never run the test on a installation where you have played around with course reserves? I think that makes the second option sound a lot better :) -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 Kyle M Hall k...@bywatersolutions.com changed: What|Removed |Added Status|Signed Off |Failed QA CC||k...@bywatersolutions.com --- Comment #13 from Kyle M Hall k...@bywatersolutions.com --- Test 10 at the least may fail if there is any data already in the courses table. This patch removes the truncations that ensure the tables are empty. I think there are two possibilities: 1) Do we require that the tables be empty before running the unit test? If so, perhaps there should be a test for that. No other changes needed. or 2) Implement the transaction discussed in comments 9 - 12. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 --- Comment #11 from Jonathan Druart jonathan.dru...@biblibre.com --- (In reply to comment #9) When I do this kind of testing, I do it within a transaction, and rollback at the end. That way I do not need to think about a proper cleanup. Has there been any thoughts on that subject? Yes we should look deeper into this way. The t/db_dependent/HoldsQueue.t already use a roolback. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 --- Comment #12 from Srdjan Jankovic srd...@catalyst.net.nz --- Yes we should look deeper into this way. The t/db_dependent/HoldsQueue.t already use a roolback. No wonder, I wrote it :) -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 --- Comment #6 from Jonathan Druart jonathan.dru...@biblibre.com --- (In reply to comment #5) Do I need to do some prep first, or some special config? No, it is the goal of this patch :) Since the course course are removed at the end of the test file, I think the truncate queries are useless. I will provide a new patch. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 Jonathan Druart jonathan.dru...@biblibre.com changed: What|Removed |Added Attachment #18382|0 |1 is obsolete|| --- Comment #7 from Jonathan Druart jonathan.dru...@biblibre.com --- Created attachment 18638 -- http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18638action=edit Bug 10332: CourseReserves.t needs to create its own data prove t/db_dependent/CourseReserves.t t/db_dependent/CourseReserves.t .. ok All tests successful. Files=1, Tests=20, 2 wallclock secs ( 0.02 usr 0.00 sys + 0.43 cusr 0.03 csys = 0.48 CPU) Result: PASS -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 Jared Camins-Esakov jcam...@cpbibliography.com changed: What|Removed |Added Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 Jared Camins-Esakov jcam...@cpbibliography.com changed: What|Removed |Added Attachment #18638|0 |1 is obsolete|| --- Comment #8 from Jared Camins-Esakov jcam...@cpbibliography.com --- Created attachment 18645 -- http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18645action=edit Bug 10332: CourseReserves.t needs to create its own data prove t/db_dependent/CourseReserves.t t/db_dependent/CourseReserves.t .. ok All tests successful. Files=1, Tests=20, 2 wallclock secs ( 0.02 usr 0.00 sys + 0.43 cusr 0.03 csys = 0.48 CPU) Result: PASS Signed-off-by: Jared Camins-Esakov jcam...@cpbibliography.com Without correct data, test fails prior to patch, passes no matter what after patch is applied. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 --- Comment #9 from Srdjan Jankovic srd...@catalyst.net.nz --- I know this is not the right forum to raise the topic, but I've done worse things in my life: When I do this kind of testing, I do it within a transaction, and rollback at the end. That way I do not need to think about a proper cleanup. Has there been any thoughts on that subject? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 --- Comment #10 from Jared Camins-Esakov jcam...@cpbibliography.com --- (In reply to comment #9) I know this is not the right forum to raise the topic, but I've done worse things in my life: When I do this kind of testing, I do it within a transaction, and rollback at the end. That way I do not need to think about a proper cleanup. Has there been any thoughts on that subject? I love that idea! But I have no idea if it's possible to do that within our existing code. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 Srdjan Jankovic srd...@catalyst.net.nz changed: What|Removed |Added CC||srd...@catalyst.net.nz --- Comment #5 from Srdjan Jankovic srd...@catalyst.net.nz --- Jonathan, I'm getting DBD::mysql::db do failed: Cannot truncate a table referenced in a foreign key constraint (`koha`.`course_instructors`, CONSTRAINT `course_instructors_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `koha`.`courses` (`course_id`)) at t/db_dependent/CourseReserves.t line 22. DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`koha`.`items`, CONSTRAINT `items_ibfk_2` FOREIGN KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE) at C4/Items.pm line 2105. Do I need to do some prep first, or some special config? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 --- Comment #4 from Jonathan Druart jonathan.dru...@biblibre.com --- (In reply to comment #2) Hi Jonathan I get this DBD::mysql::db do failed: Cannot truncate a table referenced in a foreign key constraint (`koha_persona`.`course_instructors`, CONSTRAINT `course_instructors_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `koha_persona`.`courses` (`course_id`)) at t/db_dependent/CourseReserves.t line 22. I cannot reproduce :-/ The error is weird, the script truncate the course_instructors table before the courses table. So normally no course_instructors.course_id should refers to a courses.course_id. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 Jonathan Druart jonathan.dru...@biblibre.com changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|gmcha...@gmail.com |jonathan.dru...@biblibre.co ||m -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 Jonathan Druart jonathan.dru...@biblibre.com changed: What|Removed |Added Depends on||10273 -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 --- Comment #1 from Jonathan Druart jonathan.dru...@biblibre.com --- Created attachment 18382 -- http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=18382action=edit Bug 10332: CourseReserves.t needs to create its own data prove t/db_dependent/CourseReserves.t t/db_dependent/CourseReserves.t .. ok All tests successful. Files=1, Tests=20, 2 wallclock secs ( 0.02 usr 0.00 sys + 0.43 cusr 0.03 csys = 0.48 CPU) Result: PASS -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 Jonathan Druart jonathan.dru...@biblibre.com changed: What|Removed |Added Status|ASSIGNED|Needs Signoff -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 Jonathan Druart jonathan.dru...@biblibre.com changed: What|Removed |Added Blocks||10273 Depends on|10273 | -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 Chris Cormack ch...@bigballofwax.co.nz changed: What|Removed |Added CC||ch...@bigballofwax.co.nz --- Comment #2 from Chris Cormack ch...@bigballofwax.co.nz --- Hi Jonathan I get this DBD::mysql::db do failed: Cannot truncate a table referenced in a foreign key constraint (`koha_persona`.`course_instructors`, CONSTRAINT `course_instructors_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `koha_persona`.`courses` (`course_id`)) at t/db_dependent/CourseReserves.t line 22. DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`koha_persona`.`items`, CONSTRAINT `items_ibfk_2` FOREIGN KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE) at C4/Items.pm line 2105. When trying on my machine -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 10332] UT: CourseReserves.t needs to create its own data
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10332 --- Comment #3 from Chris Cormack ch...@bigballofwax.co.nz --- (In reply to comment #2) Hi Jonathan I get this DBD::mysql::db do failed: Cannot truncate a table referenced in a foreign key constraint (`koha_persona`.`course_instructors`, CONSTRAINT `course_instructors_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `koha_persona`.`courses` (`course_id`)) at t/db_dependent/CourseReserves.t line 22. DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`koha_persona`.`items`, CONSTRAINT `items_ibfk_2` FOREIGN KEY (`homebranch`) REFERENCES `branches` (`branchcode`) ON UPDATE CASCADE) at C4/Items.pm line 2105. When trying on my machine The second error to do with branches was a data one, fixed that, but I am still getting the can't truncate error. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/