[Bug 29368] New: Zebra index not correctly mocked from tests
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29368 Bug ID: 29368 Summary: Zebra index not correctly mocked from tests Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: ASSIGNED Severity: major Priority: P5 - low Component: Test Suite Assignee: jonathan.druart+koha@gmail.com Reporter: jonathan.druart+koha@gmail.com QA Contact: testopia@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=29368 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Keywords| |rel_21_11_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29368 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 127087 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127087&action=edit Bug 29368: Correctly mock Zebra index from tests This is just reusing what is done in Search.t (and that is correct). But search_utf8.t and remove_from_cart.t are wrong -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29368 --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 127088 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127088&action=edit Bug 29368: Don't crash if search engine returns a deleted record Needs to be moved to its own bug report -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29368 --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 127089 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127089&action=edit Bug 29368: Fix remove_from_cart Reusing what has been done previously -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29368 --- Comment #4 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Jonathan Druart from comment #3)
Created attachment 127089 [details] [review] Bug 29368: Fix remove_from_cart
Reusing what has been done previously
This does not actually work. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29368 --- Comment #5 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- I think the trick may have worked before (no plack), but now I really don't see how we could find a fix for mocking correctly the koha-conf (and so zebra config/index). The only solution I see would be to introduce a fixed path for an alternate koha-conf file. Koha::Config->guess_koha_conf would pick it first if exists (only for dev_install). I don't even know if that would work (as we are loading it very early). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29368 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |In Discussion -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29368 --- Comment #6 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- And we cannot know it's a dev_install before we load koha-conf... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29368 --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- We could mess with the usual koha-conf file (replace the zebra paths before and after the tests) but that feels so bad and wrong. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29368 --- Comment #8 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- I've tried with a ALT_KOHA_CONF to pick before KOHA_CONF (in Koha::Config->guess_koha_conf but it does not work either). Plack is loaded already and the context is kept in a module var. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29368 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #127087|0 |1 is obsolete| | Attachment #127088|0 |1 is obsolete| | Attachment #127089|0 |1 is obsolete| | --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 127097 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127097&action=edit Bug 29368: Correctly mock Zebra index from tests This is just reusing what is done in Search.t (and that is correct). But search_utf8.t and remove_from_cart.t are wrong as we want to use the UI (and we cannot mock the zebra index, ie. koha-conf, from tests for plack). This still needs some work but improve a bit the existing code and make tests pass (hopefully!) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29368 --- Comment #10 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 127099 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=127099&action=edit Bug 29368: Fix remove_from_cart Reusing what has been done previously. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29368 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29368 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29368 --- Comment #11 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29368 --- Comment #12 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- So basically this is not perfect as we are not really mocking zebra index for UI tests, but tests may be passing and jenkins will be happy for 21.11.00 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29368 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_21_11_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29368 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org