Summary: | Some t/Biblio tests are database dependent | ||
---|---|---|---|
Product: | Koha | Reporter: | Marcel de Rooy <m.de.rooy> |
Component: | Test Suite | Assignee: | Marcel de Rooy <m.de.rooy> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, mtj |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | 18361 | ||
Bug Blocks: | 10306 | ||
Attachments: |
Bug 18951: Some t/Biblio tests are database dependent (git mv)
Bug 18951: Create data for TransformKohaToMarc.t Bug 18951: Adjust Isbd.t Bug 18951: Some t/Biblio tests are database dependent (git mv) Bug 18951: Create data for TransformKohaToMarc.t Bug 18951: Adjust Isbd.t Bug 18951: Some t/Biblio tests are database dependent (git mv) Bug 18951: Create data for TransformKohaToMarc.t Bug 18951: Adjust Isbd.t |
Description
Marcel de Rooy
2017-07-18 14:22:14 UTC
Created attachment 65093 [details] [review] Bug 18951: Some t/Biblio tests are database dependent (git mv) Move Isbd.t and TransformKohaToMarc.t to db_dependent. Next patch will add a few adjustments too. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 65094 [details] [review] Bug 18951: Create data for TransformKohaToMarc.t Adding schema and caching statements. Adjust it so that the Koha to MARC mappings are not assumed to be present, but are created as needed. Remove the mock on marcflavour. It is no longer needed. Resolving a small typo. Test plan: Run t/db_dependent/Biblio/TransformKohaToMarc.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 65095 [details] [review] Bug 18951: Adjust Isbd.t Add schema calls. Remove an unneeded AddBiblio call. Test plan: Run t/db_dependent/Biblio/Isbd.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 65096 [details] [review] Bug 18951: Some t/Biblio tests are database dependent (git mv) Move Isbd.t and TransformKohaToMarc.t to db_dependent. Next patch will add a few adjustments too. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Created attachment 65097 [details] [review] Bug 18951: Create data for TransformKohaToMarc.t Adding schema and caching statements. Adjust it so that the Koha to MARC mappings are not assumed to be present, but are created as needed. Remove the mock on marcflavour. It is no longer needed. Resolving a small typo. Test plan: Run t/db_dependent/Biblio/TransformKohaToMarc.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Created attachment 65098 [details] [review] Bug 18951: Adjust Isbd.t Add schema calls. Remove an unneeded AddBiblio call. Test plan: Run t/db_dependent/Biblio/Isbd.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Created attachment 65167 [details] [review] Bug 18951: Some t/Biblio tests are database dependent (git mv) Move Isbd.t and TransformKohaToMarc.t to db_dependent. Next patch will add a few adjustments too. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 65168 [details] [review] Bug 18951: Create data for TransformKohaToMarc.t Adding schema and caching statements. Adjust it so that the Koha to MARC mappings are not assumed to be present, but are created as needed. Remove the mock on marcflavour. It is no longer needed. Resolving a small typo. Test plan: Run t/db_dependent/Biblio/TransformKohaToMarc.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 65169 [details] [review] Bug 18951: Adjust Isbd.t Add schema calls. Remove an unneeded AddBiblio call. Test plan: Run t/db_dependent/Biblio/Isbd.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Pushed to master for 17.11, thanks to everybody involved! Testing on 17.05.x, I get a crash : $ prove t/db_dependent/Biblio/TransformKohaToMarc.t t/db_dependent/Biblio/TransformKohaToMarc.t .. DBIx::Class::ResultSet::find(): find() expects either a column/value hashref, or a list of values corresponding to the columns of the specified unique constraint 'primary' at /home/koha/src/Koha/Objects.pm line 83 # Looks like your test exited with 255 before it could output anything. t/db_dependent/Biblio/TransformKohaToMarc.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 1/1 subtests Test Summary Report ------------------- t/db_dependent/Biblio/TransformKohaToMarc.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 1 tests but ran 0. Files=1, Tests=0, 1 wallclock secs ( 0.02 usr 0.00 sys + 0.71 cusr 0.04 csys = 0.77 CPU) Result: FAIL Looks like Koha::MarcSubfieldStructures->find('','300','b') crashed. May I use Koha::MarcSubfieldStructures->search( { frameworkcode => '', tagfield => '300', tagsubfield => 'a' } ) like in AuthorisedValues.t ? (In reply to Fridolin SOMERS from comment #11) > Looks like Koha::MarcSubfieldStructures->find('','300','b') crashed. > May I use Koha::MarcSubfieldStructures->search( { frameworkcode => '', > tagfield => '300', tagsubfield => 'a' } ) like in AuthorisedValues.t ? Yes, that should do it. You will need an extra ->next or ->first or so. There was an adjustment to Koha::Object's find. Probably not in 17.05. (In reply to Marcel de Rooy from comment #12) > (In reply to Fridolin SOMERS from comment #11) > > Looks like Koha::MarcSubfieldStructures->find('','300','b') crashed. > > May I use Koha::MarcSubfieldStructures->search( { frameworkcode => '', > > tagfield => '300', tagsubfield => 'a' } ) like in AuthorisedValues.t ? > > Yes, that should do it. You will need an extra ->next or ->first or so. > There was an adjustment to Koha::Object's find. Probably not in 17.05. Yes I found it is dependent from Bug 18361 not in 17.05.x. I choose to integrate it. Pushed to 17.05.x, will be in 17.05.03. Blocked by 18361 not applying to 16.11.x. If you want this to be included, please help by rebasing it to the latest 16.11.x. (In reply to Katrin Fischer from comment #15) > Blocked by 18361 not applying to 16.11.x. If you want this to be included, > please help by rebasing it to the latest 16.11.x. Try again :) These patches have been pushed to 16.11.x and will be in 16.11.11. Pushed to 16.05.x, for 16.05.16 release |