[Bug 16637] New: t/00-load.t warning from C4/Tags.pm
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 Bug ID: 16637 Summary: t/00-load.t warning from C4/Tags.pm Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Test Suite Assignee: mtompset@hotmail.com Reporter: mtompset@hotmail.com QA Contact: gmcharlt@gmail.com Added optional dependency, so as to explain why testing explodes when the Enhanced Content system preference TagsExternalDictionary is set. Since INIT runs after BEGIN, moved INIT logic into BEGIN in order to remove INIT and thus eliminate the warning. TEST PLAN --------- 1) prove t/00-load.t -- warning about INIT for C4::Tags 2) prove `git grep -l Tags | grep [.]t$` -- should all run okay 3) apply patch 4) repeat steps 1 and 2 -- warning should be gone, and everything else run okay 5) run koha qa test tools -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=14110 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 M. Tompsett <mtompset@hotmail.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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 --- Comment #1 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 51958 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=51958&action=edit Bug 16637: t/00-load.t warning from C4/Tags.pm Added optional dependency, so as to explain why testing explodes when the Enhanced Content system preference TagsExternalDictionary is set (/usr/bin/ispell). Since INIT runs after BEGIN, moved INIT logic into BEGIN in order to remove INIT and thus eliminate the warning. TEST PLAN --------- 1) prove t/00-load.t -- warning about INIT for C4::Tags 2) prove `git grep -l Tags | grep [.]t$` -- should all run okay 3) apply patch 4) repeat steps 1 and 2 -- warning should be gone, and everything else run okay 5) run koha qa test tools -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16455 CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Is it a duplicate of bug 16455? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Jonathan Druart from comment #2)
Is it a duplicate of bug 16455?
Not quite. Because I also expressly add the PerlDependencies.pm which helps people realize things that could explode. I'll rework this to exclude the bug 16455 portion and be dependent on it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to M. Tompsett from comment #3)
(In reply to Jonathan Druart from comment #2)
Is it a duplicate of bug 16455?
Not quite. Because I also expressly add the PerlDependencies.pm which helps people realize things that could explode. I'll rework this to exclude the bug 16455 portion and be dependent on it.
I passed QA already on 16455. Please adjust this patch? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Marcel de Rooy from comment #4)
I passed QA already on 16455. Please adjust this patch?
I will be, but you'll notice I can't cleanly apply 16455. :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51958|0 |1 is obsolete| | --- Comment #6 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 52059 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52059&action=edit Bug 16637: Optional Dependency not listed If a user decides to set the Enhanced Content system preference TagsExternalDictionary to something (e.g. /usr/bin/ispell), but the Lingua::Ispell perl library is not installed, Koha dies ungracefully. TEST PLAN --------- 1) fill in TagsExternalDictionary system preference 2) check out the Perl modules tab in the about Koha page -- Lingua::Ispell is not listed. 3) sudo apt-get install liblingua-ispell-perl -- likely uninstalled, so this will ensure it is. 4) prove t/db_dependent/Tags.t -- should work fine. 5) sudo apt-get remove liblingua-ispell-perl 6) prove t/db_dependent/Tags.t -- it should die horribly because Lingua::Ispell is not installed. 7) apply patch 8) prove t/db_dependent/Tags.t -- like bug 16582 and the others, all tests will be skipped and a notice given of the missing optional library 9) sudo apt-get install liblingua-ispell-perl 10) prove t/db_dependent/Tags.t -- should run fine 11) check out the Perl modules tab in the about Koha page -- Lingua::Ispell is listed. 12) run koha qa test tools -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|t/00-load.t warning from |Dependency for C4::Tags not |C4/Tags.pm |listed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff --- Comment #7 from M. Tompsett <mtompset@hotmail.com> --- This bug was initially triggered by what has been resolved in bug 16455. However, other minor side pieces were not dealt with in that bug, so this bug has been repurposed. The test plan in comment #6 reflects this. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Mark, What about this (without your patch): If I clear the externaldict pref, the module Tags compiles ok even without the Ispell module. If I enter a value in the pref, I have the Cant locate Ispell module error. Sounds weird.. You skip testing now if the module is not installed. That is not taking into consideration the value of the pref, as above. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to M. Tompsett from comment #5)
(In reply to Marcel de Rooy from comment #4)
I passed QA already on 16455. Please adjust this patch?
I will be, but you'll notice I can't cleanly apply 16455. :)
Did you git fetch or apply the dependency of 16455.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED --- Comment #10 from M. Tompsett <mtompset@hotmail.com> --- Oh... right... Shoot... tweaking still... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #52059|0 |1 is obsolete| | --- Comment #11 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 52060 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52060&action=edit Bug 16637: Dependency for C4::Tags not listed Added optional dependency, so as to explain why testing explodes when the Enhanced Content system preference TagsExternalDictionary is set. It is optional, because not only does TagsExternalDictionary have to be set, but TagsEnabled must be 'Allow'. Also tweaked C4/Tags.pm to ignore TagsExternalDictionary, if Lingua::Ispell is not installed. A warning is given. TEST PLAN --------- 1) Set the Enhanced Content system preference TagsExternalDictionary to /usr/bin/ispell 2) sudo apt-get install liblingua-ispell-perl -- should be a new install 3) prove t/db_dependent/Tags.t -- should work fine 4) sudo apt-get remove liblingua-ispell-perl 5) prove t/db_dependent/Tags.t -- should explode 6) Clear the Enhanced Content system preference TagsExternalDictionary 7) prove t/db_dependent/Tags.t -- should work fine 8) apply patch 9) prove t/db_dependent/Tags.t -- should work fine 10) Set the Enhanced Content system preference TagsExternalDictionary to /usr/bin/ispell 11) prove t/db_dependent/Tags.t -- should work, with warning. 12) sudo apt-get install liblingua-ispell-perl 13) prove t/db_dependent/Tags.t -- should work fine 14) run koha qa test tools. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #52060|0 |1 is obsolete| | --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 52061 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52061&action=edit Bug 16637: Dependency for C4::Tags not listed Added optional dependency, so as to explain why testing explodes when the Enhanced Content system preference TagsExternalDictionary is set. It is optional, because not only does TagsExternalDictionary have to be set, but TagsEnabled must be 'Allow'. Also tweaked C4/Tags.pm to ignore TagsExternalDictionary, if Lingua::Ispell is not installed. A warning is given. TEST PLAN --------- 1) Set the Enhanced Content system preference TagsExternalDictionary to /usr/bin/ispell 2) sudo apt-get install liblingua-ispell-perl -- should be a new install 3) prove t/db_dependent/Tags.t -- should work fine 4) sudo apt-get remove liblingua-ispell-perl 5) prove t/db_dependent/Tags.t -- should explode 6) Clear the Enhanced Content system preference TagsExternalDictionary 7) prove t/db_dependent/Tags.t -- should work fine 8) apply patch 9) prove t/db_dependent/Tags.t -- should work fine 10) Set the Enhanced Content system preference TagsExternalDictionary to /usr/bin/ispell 11) prove t/db_dependent/Tags.t -- should work, with warning. 12) sudo apt-get install liblingua-ispell-perl 13) prove t/db_dependent/Tags.t -- should work fine 14) run koha qa test tools. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Post-hackfest hotel Olympia lobby signoff. Kalimera! Works as expected. At this moment the Tags.t test does not need the database btw, but the module should have much more test coverage. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Dependency for C4::Tags not |Dependency for C4::Tags not |listed. |listed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 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=16637 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #52061|0 |1 is obsolete| | --- Comment #13 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 52100 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=52100&action=edit Bug 16637: Dependency for C4::Tags not listed Added optional dependency, so as to explain why testing explodes when the Enhanced Content system preference TagsExternalDictionary is set. It is optional, because not only does TagsExternalDictionary have to be set, but TagsEnabled must be 'Allow'. Also tweaked C4/Tags.pm to ignore TagsExternalDictionary, if Lingua::Ispell is not installed. A warning is given. TEST PLAN --------- 1) Set the Enhanced Content system preference TagsExternalDictionary to /usr/bin/ispell 2) sudo apt-get install liblingua-ispell-perl -- should be a new install 3) prove t/db_dependent/Tags.t -- should work fine 4) sudo apt-get remove liblingua-ispell-perl 5) prove t/db_dependent/Tags.t -- should explode 6) Clear the Enhanced Content system preference TagsExternalDictionary 7) prove t/db_dependent/Tags.t -- should work fine 8) apply patch 9) prove t/db_dependent/Tags.t -- should work fine 10) Set the Enhanced Content system preference TagsExternalDictionary to /usr/bin/ispell 11) prove t/db_dependent/Tags.t -- should work, with warning. 12) sudo apt-get install liblingua-ispell-perl 13) prove t/db_dependent/Tags.t -- should work fine 14) run koha qa test tools. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Post-hackfest hotel Olympia lobby signoff. Kalimera! Works as expected. At this moment the Tags.t test does not need the database btw, but the module should have much more test coverage. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |16455 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16455 [Bug 16455] TagsExternalDictionary does not work under Plack -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also|https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=16455 | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #14 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for Koha 16.11, thanks Mark! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #15 from Frédéric Demians <frederic@tamil.fr> --- Pushed in 16.05. Will be in 16.05.01. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16637 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |julian.maurice@biblibre.com --- Comment #16 from Julian Maurice <julian.maurice@biblibre.com> --- Patch pushed to 3.22.x, will be in 3.22.8 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org