[Bug 8353] New: Add test to compare sysprefs in db to syspref.sql
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8353 Priority: P5 - low Change sponsored?: --- Bug ID: 8353 Assignee: jcamins@cpbibliography.com Summary: Add test to compare sysprefs in db to syspref.sql Severity: enhancement Classification: Unclassified OS: All Reporter: jcamins@cpbibliography.com Hardware: All Status: NEW Version: master Component: Test Suite Product: Koha To test: 1. Run prove xt/check_sysprefs.t 2. Note that the results warn you if any sysprefs are missing -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8353 --- Comment #1 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Created attachment 10628 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=10628&action=edit Bug 8353: Adds a test to check for missing sysprefs in the database Adds a non-test mode (--showsql option) that displays the missing sysprefs as sql inserts. Some sysprefs were missed from the syspref file due to extra spaces in the insert : fixed. The test now checks if there are at least as many sysprefs in the database as in the syspref file (instead of checking for the exact number) Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> Cherrypicked from BibLibre master, rebased onto current master, and corrected typos, 2012-07-03 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8353 Jared Camins-Esakov <jcamins@cpbibliography.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=8353 Jared Camins-Esakov <jcamins@cpbibliography.com> 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=8353 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|jcamins@cpbibliography.com |henridamien.laurent@biblibr | |e.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8353 --- Comment #2 from Paul Poulain <paul.poulain@biblibre.com> --- Created attachment 10748 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=10748&action=edit Bug 8353 follow-up, perltidy It's a new script, perltidy-ing it before pushing -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8353 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |chris@bigballofwax.co.nz, | |paul.poulain@biblibre.com QA Contact| |paul.poulain@biblibre.com --- Comment #3 from Paul Poulain <paul.poulain@biblibre.com> --- QA comment: new script, usefull for testing system preferences. well documented, properly written. I just submit a follow-up with the script perltidy-ed Chris = before pushing, could you confirm it should be in xt/ ? It's a db dependant test, that is useless to run on jenkins, because -unless there's something really weird- the table will always contain sysprefs.sql because it has been filed from there ! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8353 --- Comment #4 from Chris Cormack <chris@bigballofwax.co.nz> --- xt = release tests so yeah, this probably better in t/db_dependent -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8353 --- Comment #5 from Paul Poulain <paul.poulain@biblibre.com> --- (In reply to comment #4)
xt = release tests
so yeah, this probably better in t/db_dependent
Thinking of it I think it's more a maintainance script, that should be in misc/maintenance than a test for jenkins: This is usefull for a production server, to check if something is missing in your systempreferences. Chris, do you agree ? If yes, i'll write a follow-up to move the script to misc/maintenance -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8353 --- Comment #6 from Chris Cormack <chris@bigballofwax.co.nz> --- (In reply to comment #5)
(In reply to comment #4)
xt = release tests
so yeah, this probably better in t/db_dependent
Thinking of it I think it's more a maintainance script, that should be in misc/maintenance than a test for jenkins: This is usefull for a production server, to check if something is missing in your systempreferences.
Chris, do you agree ? If yes, i'll write a follow-up to move the script to misc/maintenance
I think maintenance would be fine, but it's Jared's patch i'll defer to him. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8353 --- Comment #7 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- (In reply to comment #6)
(In reply to comment #5)
Thinking of it I think it's more a maintainance script, that should be in misc/maintenance than a test for jenkins: This is usefull for a production server, to check if something is missing in your systempreferences.
Chris, do you agree ? If yes, i'll write a follow-up to move the script to misc/maintenance
I think maintenance would be fine, but it's Jared's patch i'll defer to him.
I would greatly prefer it be in t/db_dependent. As of right now, we do practically nothing to test upgrades (in terms of automated testing, at least). Although the test would be essentially a no-op in a new installation, it would be very useful in testing an upgrade. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8353 --- Comment #8 from Paul Poulain <paul.poulain@biblibre.com> --- Created attachment 10813 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=10813&action=edit Bug 8353 follow-up adding a tiny sh in misc/maintenance This script will help the sysadmin know there's a test he can use during maintenance -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8353 --- Comment #9 from Paul Poulain <paul.poulain@biblibre.com> --- (In reply to comment #7)
Chris, do you agree ? If yes, i'll write a follow-up to move the script to misc/maintenance
I think maintenance would be fine, but it's Jared's patch i'll defer to him.
I would greatly prefer it be in t/db_dependent. As of right now, we do practically nothing to test upgrades (in terms of automated testing, at least). Although the test would be essentially a no-op in a new installation, it would be very useful in testing an upgrade.
In french we say "cheese and desert". With the small 2nd follow-up, we add a tiny sh script that run the test. Sysadmin look in misc/maintenance, they won't necessarly know there's something usefull in xt/ for daily maintenance. With this 4 lines sh, they will. (I've added the --showsql option as a sysadmin want to know what to add) Please signoff & I'll push -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8353 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #10628|0 |1 is obsolete| | Attachment #10748|0 |1 is obsolete| | Attachment #10813|0 |1 is obsolete| | --- Comment #10 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Created attachment 10814 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=10814&action=edit Bug 8353: Adds a test to check for missing sysprefs in the database Adds a non-test mode (--showsql option) that displays the missing sysprefs as sql inserts. Some sysprefs were missed from the syspref file due to extra spaces in the insert : fixed. The test now checks if there are at least as many sysprefs in the database as in the syspref file (instead of checking for the exact number) Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> Cherrypicked from BibLibre master, rebased onto current master, and corrected typos, 2012-07-03 Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8353 --- Comment #11 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Created attachment 10815 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=10815&action=edit Bug 8353 follow-up: Perltidy new test Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8353 --- Comment #12 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Created attachment 10816 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=10816&action=edit Bug 8353 follow-up adding a tiny sh in misc/maintenance This script will help the sysadmin know there's a test he can use during maintenance Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8353 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master Version|master |rel_3_10 --- Comment #13 from Paul Poulain <paul.poulain@biblibre.com> --- Patch pushed -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8353 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add test to compare |Add test to compare system |sysprefs in db to |preferences in db to |syspref.sql |syspref.sql -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8353 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED Resolution|--- |FIXED --- Comment #14 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This test exists on master. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org