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

Jonathan Druart <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
           Keywords|                            |additional_work_needed

--- Comment #55 from Jonathan Druart <[email protected]> ---
I suspect this change to be the cause of the following 2 failures:

$ prove t/db_dependent/api/v1/patrons.t
t/db_dependent/api/v1/patrons.t .. 3/7 
            #   Failed test at t/db_dependent/api/v1/patrons.t line 1042.
            #          got: 'zmEXaS_1HNKHibXWfmUaGo2s8GVHLodtQe5ulfn2oLO'
            #     expected:
'pD7HHacPDh6DExQ7wl2XBBZNj2cmz3_F0_iSUhNAFEVY4Wv16OS55oN9aVWVjB'

            #   Failed test at t/db_dependent/api/v1/patrons.t line 1042.
            #          got: 'zmEXaS_1HNKHibXWfmUaGo2s8GVHLodtQe5ulfn2oLO'
            #     expected:
'Z1dK8ALzVvAz3pjOgpVOzM9cVizAnWw7Fy8rB9eTfuLvCRCdhzqpgFcMN3'

            #   Failed test at t/db_dependent/api/v1/patrons.t line 1042.
            #          got:
'Z1dK8ALzVvAz3pjOgpVOzM9cVizAnWw7Fy8rB9eTfuLvCRCdhzqpgFcMN3'
            #     expected: 'zmEXaS_1HNKHibXWfmUaGo2s8GVHLodtQe5ulfn2oLO'

            #   Failed test at t/db_dependent/api/v1/patrons.t line 1042.
            #          got:
'pD7HHacPDh6DExQ7wl2XBBZNj2cmz3_F0_iSUhNAFEVY4Wv16OS55oN9aVWVjB'
            #     expected: 'zmEXaS_1HNKHibXWfmUaGo2s8GVHLodtQe5ulfn2oLO'
            # Looks like you failed 4 tests of 26.

        #   Failed test 'extended_attributes tests'
        #   at t/db_dependent/api/v1/patrons.t line 1045.
        # Looks like you failed 1 test of 44.

    #   Failed test 'librarian access tests'
    #   at t/db_dependent/api/v1/patrons.t line 1048.
    # Looks like you failed 1 test of 2.
t/db_dependent/api/v1/patrons.t .. 4/7 
#   Failed test 'update() tests'
#   at t/db_dependent/api/v1/patrons.t line 1049.
t/db_dependent/api/v1/patrons.t .. 7/7 # Looks like you failed 1 test of 7.
t/db_dependent/api/v1/patrons.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/7 subtests 



$ prove t/db_dependent/api/v1/patrons_extended_attributes.t
t/db_dependent/api/v1/patrons_extended_attributes.t .. 2/5 
    #   Failed test 'exact match for JSON Pointer "/0/type"'
    #   at t/db_dependent/api/v1/patrons_extended_attributes.t line 358.
    #          got: 'KDtH_WsRVKD5KY5R9N_VTJTJkZ6xfGKtqmD'
    #     expected:
'DDqUW_ML8Mz3FfSWsx2kOUoywRGNwi2UuGvNjhVKyqkoKexxB_0aidSXowl6'

    #   Failed test 'exact match for JSON Pointer "/0/value"'
    #   at t/db_dependent/api/v1/patrons_extended_attributes.t line 358.
    #          got: 'updated_mandatory'
    #     expected: 'updated_repeatable_1'

    #   Failed test 'exact match for JSON Pointer "/1/value"'
    #   at t/db_dependent/api/v1/patrons_extended_attributes.t line 358.
    #          got: 'updated_repeatable_1'
    #     expected: 'updated_repeatable_2'

    #   Failed test 'exact match for JSON Pointer "/2/value"'
    #   at t/db_dependent/api/v1/patrons_extended_attributes.t line 358.
    #          got: 'updated_repeatable_2'
    #     expected: 'updated_repeatable_3'

    #   Failed test 'exact match for JSON Pointer "/3/type"'
    #   at t/db_dependent/api/v1/patrons_extended_attributes.t line 358.
    #          got:
'DDqUW_ML8Mz3FfSWsx2kOUoywRGNwi2UuGvNjhVKyqkoKexxB_0aidSXowl6'
    #     expected: 'KDtH_WsRVKD5KY5R9N_VTJTJkZ6xfGKtqmD'

    #   Failed test 'exact match for JSON Pointer "/3/value"'
    #   at t/db_dependent/api/v1/patrons_extended_attributes.t line 358.
    #          got: 'updated_repeatable_3'
    #     expected: 'updated_mandatory'
    # Looks like you failed 6 tests of 29.
t/db_dependent/api/v1/patrons_extended_attributes.t .. 3/5 
#   Failed test 'overwrite() tests'
#   at t/db_dependent/api/v1/patrons_extended_attributes.t line 361.


They could eventually pass as it's a random failure, but it's failing almost
every run locally.

The problem is the following:
We send some attributes to the PUT route, but return the attributes in a
different order.
My guess is that the culprit is this line:
Koha/Patron.pm
2308         # Sort new attributes by code
2309         @new_attributes = sort { $a->attribute cmp $b->attribute }
@new_attributes;

Please fix ASAP.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to