[Bug 42581] New: xt/api.t shouldn't test routes injected by plugins
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42581 Bug ID: 42581 Summary: xt/api.t shouldn't test routes injected by plugins Initiative type: --- Sponsorship --- status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Test Suite Assignee: jonathan.druart@gmail.com Reporter: jonathan.druart@gmail.com QA Contact: testopia@bugs.koha-community.org If some plugins are installed and inject REST API routes, xt/api.t may fail. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42581 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=42581 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 198983 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198983&action=edit Bug 42581: Exclude plugins' routes from xt/api.t If some plugins are installed and inject REST API routes, xt/api.t may fail. Test plan: You can install the Jump plugin (https://gitlab.com/joubu/koha-plugin-jump) and run xt/api.t It will fail: ``` get /contrib/jump/parse -> uses tag 'parse' not present in top level list get /contrib/jump/search -> uses tag 'search' not present in top level list get /contrib/jump/search -> uses tag 'objects' not present in top level list get /contrib/jump/static/static_files/commandPalette.js -> uses tag 'Jump' not present in top level list get /contrib/jump/static/static_files/jump.css -> uses tag 'Jump' not present in top level list [...] ``` Apply this patch and run `prove xt/api.t` again => It should pass -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42581 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=42581 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42581 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #198983|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42581 --- Comment #2 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 199203 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199203&action=edit Bug 42581: Exclude plugins' routes from xt/api.t If some plugins are installed and inject REST API routes, xt/api.t may fail. Test plan: You can install the Jump plugin (https://gitlab.com/joubu/koha-plugin-jump) and run xt/api.t It will fail: ``` get /contrib/jump/parse -> uses tag 'parse' not present in top level list get /contrib/jump/search -> uses tag 'search' not present in top level list get /contrib/jump/search -> uses tag 'objects' not present in top level list get /contrib/jump/static/static_files/commandPalette.js -> uses tag 'Jump' not present in top level list get /contrib/jump/static/static_files/jump.css -> uses tag 'Jump' not present in top level list [...] ``` Apply this patch and run `prove xt/api.t` again => It should pass Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42581 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #3 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Tested with a local plugin I have: ```shell $ ktd --proxy --single-plugin ~/git/koha-plugins/innreach-ill up -d k$ ktd --shell k$ qa -c 1 -v Tag v25.05.00-1 found in /kohadevbox/koha — checking out branch main in /kohadevbox/qa-test-tools Already on 'main' Your branch is up to date with 'origin/main'. testing 1 commit(s) (applied to 11d7450 '2a Bug 37762: (RM follow-up): Tidy t/') Processing files [RUNNING] xt/api.t [PASS] xt/api.t Result: [PASS] xt/api.t Processing additional checks PASS! * Was this bug sponsored by anyone? Running tests (1) * Proving /kohadevbox/koha/xt/api.t PASS ``` Trivial patch, no QA concerns. Straight QA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42581 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42581 --- Comment #4 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42581 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.05.00 |26.05.00,25.11.05 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42581 --- Comment #5 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org