[Bug 31134] New: t/Ediorder.t tests failing on 22.05.02
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31134 Bug ID: 31134 Summary: t/Ediorder.t tests failing on 22.05.02 Change sponsored?: --- Product: Koha Version: 22.05 Hardware: All OS: All Status: NEW Severity: critical Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: aleisha@catalyst.net.nz QA Contact: testopia@bugs.koha-community.org Bug 30135 might have introduced a flaw in the tests - when we try to install Koha 22.05.02 and run t/ediorder.t, it fails with this output: vagrant@kohadevbox:kohaclone((v22.05.02))$ sudo koha-shell kohadev kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove t/Ediorder.t t/Ediorder.t .. 1/13 Use of uninitialized value $lsq_field in hash element at /home/vagrant/kohaclone/Koha/Edifact/Order.pm line 563. Use of uninitialized value $lsq_field in hash element at /home/vagrant/kohaclone/Koha/Edifact/Order.pm line 563. t/Ediorder.t .. 11/13 # Failed test 'Single Gir field OK' # at t/Ediorder.t line 104. # got: 'GIR+001+BUDGET:LFN+BRANCH:LLO+TYPE:LST+CALL:LSM' # expected: 'GIR+001+BUDGET:LFN+BRANCH:LLO+TYPE:LST+LOCATION:LSQ+CALL:LSM' Use of uninitialized value $lsq_field in hash element at /home/vagrant/kohaclone/Koha/Edifact/Order.pm line 563. Use of uninitialized value $lsq_field in hash element at /home/vagrant/kohaclone/Koha/Edifact/Order.pm line 563. $VAR1 = 'GIR+001+BUDGET:LFN+BRANCH:LLO+TYPE:LST+CALL:LSM+S_I:LVT'; $VAR2 = 'GIR+002+BUDGET:LFN+BRANCH:LLO+TYPE:LST+CALL:LSM+S_I:LVT'; Use of uninitialized value $got in string eq at (eval in cmp_ok) t/Ediorder.t line 119. # Failed test 'First part of split Gir field OK' # at t/Ediorder.t line 119. # got: undef # expected: 'GIR+002+BUDGET:LFN+BRANCH:LLO+TYPE:LST+LOCATION:LSQ+CALL:LSM' Use of uninitialized value $got in string eq at (eval in cmp_ok) t/Ediorder.t line 125. # Failed test 'Second part of split GIR field OK' # at t/Ediorder.t line 125. # got: undef # expected: 'GIR+002+S_I:LVT' # Looks like you failed 3 tests of 13. t/Ediorder.t .. Dubious, test returned 3 (wstat 768, 0x300) Failed 3/13 subtests Test Summary Report ------------------- t/Ediorder.t (Wstat: 768 Tests: 13 Failed: 3) Failed tests: 11-13 Non-zero exit status: 3 Files=1, Tests=13, 2 wallclock secs ( 0.02 usr 0.00 sys + 1.40 cusr 0.10 csys = 1.52 CPU) Result: FAIL -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31134 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wainuiwitikapark@catalyst.n | |et.nz -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31134 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- % git checkout v22.05.02) % reset_all % prove t/Ediorder.t All tests successful. Works for me. And Jenkins is happy as well. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31134 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> --- Ok If I checkout the branch it fails Failed test 'Single Gir field OK' # at t/Ediorder.t line 104. # got: 'GIR+001+BUDGET:LFN+BRANCH:LLO+TYPE:LST+CALL:LSM' # expected: 'GIR+001+BUDGET:LFN+BRANCH:LLO+TYPE:LST+LOCATION:LSQ+CALL:LSM' Use of uninitialized value $lsq_field in hash element at /home/vagrant/kohaclone/Koha/Edifact/Order.pm line 563. Use of uninitialized value $lsq_field in hash element at /home/vagrant/kohaclone/Koha/Edifact/Order.pm line 563. Use of uninitialized value $got in string eq at (eval in cmp_ok) t/Ediorder.t line 117. # Failed test 'First part of split Gir field OK' # at t/Ediorder.t line 117. # got: undef # expected: 'GIR+002+BUDGET:LFN+BRANCH:LLO+TYPE:LST+LOCATION:LSQ+CALL:LSM' Use of uninitialized value $got in string eq at (eval in cmp_ok) t/Ediorder.t line 123. # Failed test 'Second part of split GIR field OK' # at t/Ediorder.t line 123. # got: undef # expected: 'GIR+002+S_I:LVT' # Looks like you failed 3 tests of 13. This is because this test is now db_dependent Koha/Edifact/Order.pm: my $lsq_field = C4::Context->preference('EdifactLSQ'); So it needs to probably be moved out of t, or that syspref needs to be mocked. The reason it works is if that syspref is set location. If I set the syspref to collection, the tests fail, if i set it location the tests pass. The problem is then when you are building a package you dont have a database, the t/ tests should all pass without relying on a syspref fetched from a db. Chris -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31134 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |30135 Assignee|koha-bugs@lists.koha-commun |martin.renvoize@ptfs-europe |ity.org |.com --- Comment #3 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Martin, can you have a look at this? Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30135 [Bug 30135] We should allow configuration of whether EDI LSQ segments map to 'location' or 'collection' -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31134 --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 137710 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137710&action=edit Bug 31134: Mock EdifactLSQ for t/Edifact.t This patch adds a mock for the EdifactLSQ preference so we can consistently pass when a database is not available. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31134 Martin Renvoize <martin.renvoize@ptfs-europe.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=31134 --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Thanks for drawing my attention to this one.. should work with the patch attached :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31134 Kyle M Hall <kyle@bywatersolutions.com> 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=31134 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137710|0 |1 is obsolete| | --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 137711 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137711&action=edit Bug 31134: Mock EdifactLSQ for t/Edifact.t This patch adds a mock for the EdifactLSQ preference so we can consistently pass when a database is not available. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31134 Jonathan Druart <jonathan.druart+koha@gmail.com> 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=31134 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137711|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 137714 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137714&action=edit Bug 31134: Mock EdifactLSQ for t/Edifact.t This patch adds a mock for the EdifactLSQ preference so we can consistently pass when a database is not available. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> 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=31134 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31134 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31134 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Pushed to master |Pushed to stable Version(s)|22.11.00 |22.11.00, 22.05.05 released in| | --- Comment #9 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 22.05.x for 22.05.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31134 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED CC| |arthur.suzuki@biblibre.com Resolution|--- |FIXED --- Comment #10 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- depends on 30135 not released in 21.11.x. won't backport. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org