[Koha-bugs] [Bug 34152] New: Tests in t/db_dependent/Koha/Item.t fail

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jun 29 13:44:27 CEST 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34152

            Bug ID: 34152
           Summary: Tests in t/db_dependent/Koha/Item.t fail
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Test Suite
          Assignee: chris at bigballofwax.co.nz
          Reporter: emmi.takkinen at koha-suomi.fi
        QA Contact: testopia at bugs.koha-community.org

Runnins prove t/db_dependent/Koha/Item.t leads to following error:

t/db_dependent/Koha/Item.t .. 13/29     # Looks like you planned 15 tests but
ran 5.
t/db_dependent/Koha/Item.t .. 15/29 
#   Failed test 'deletion'
#   at t/db_dependent/Koha/Item.t line 998.
Can't call method "can_edit_items_from" on an undefined value at
/home/emmi/Koha/Koha/Item.pm line 298.
# Looks like your test exited with 255 just after 15.
t/db_dependent/Koha/Item.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 15/29 subtests 

It seems this happens because we don't mock user enviroment for test patron.
However after fixing this issue tests still fail:

t/db_dependent/Koha/Item.t .. 14/29 encountered object
'Koha::Library=HASH(0x55f674e55708)', but neither allow_blessed,
convert_blessed nor allow_tags settings are enabled (or TO_JSON/FREEZE method
missing) at /home/emmi/Koha/Koha/BackgroundJob.pm line 107.
    # Looks like you planned 15 tests but ran 5.

#   Failed test 'deletion'
#   at t/db_dependent/Koha/Item.t line 999.
Can't call method "biblionumber" on an undefined value at
/home/emmi/Koha/t/lib/TestBuilder.pm line 193.
# Looks like your test exited with 255 just after 15.
t/db_dependent/Koha/Item.t .. Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 15/29 subtests

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list