Bug 24590

Summary: Koha/Object.t is failing on MySQL 8
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Test SuiteAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: 1joynelson, lucas, martin.renvoize
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24509
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.05.00, 19.11.03, 19.05.09
Bug Depends on:    
Bug Blocks: 23996    
Attachments: Bug 24590: Fix Koha/Object.t on MySQL 8
Bug 24590: Fix Koha/Object.t on MySQL 8

Description Jonathan Druart 2020-02-05 09:35:39 UTC
% prove t/db_dependent/Koha/Object.t
is failing on MySQL 8 with:

kohadev-koha@9bbf9ac68519:/kohadevbox/koha$ prove t/db_dependent/Koha/Object.t
t/db_dependent/Koha/Object.t .. 15/18
    #   Failed test 'Exception field is correct'
    #   at t/db_dependent/Koha/Object.t line 650.                                             
    #          got: 'api_keys.secret'
    #     expected: 'secret'                                                  
    # Looks like you failed 1 test of 16.                                                                                  
t/db_dependent/Koha/Object.t .. 16/18 
#   Failed test 'store() tests'                                
#   at t/db_dependent/Koha/Object.t line 723.          

MySQL 8 displays the tablename in the error.
Comment 1 Jonathan Druart 2020-02-05 09:37:24 UTC
Created attachment 98440 [details] [review]
Bug 24590: Fix Koha/Object.t on MySQL 8

% prove t/db_dependent/Koha/Object.t
is failing on MySQL 8 with:

 kohadev-koha@9bbf9ac68519:/kohadevbox/koha$ prove t/db_dependent/Koha/Object.t
 t/db_dependent/Koha/Object.t .. 15/18
     #   Failed test 'Exception field is correct'
     #   at t/db_dependent/Koha/Object.t line 650.
     #          got: 'api_keys.secret'
     #     expected: 'secret'
     # Looks like you failed 1 test of 16.
 t/db_dependent/Koha/Object.t .. 16/18
 #   Failed test 'store() tests'
 #   at t/db_dependent/Koha/Object.t line 723.

MySQL 8 displays the tablename in the error.
Comment 2 Martin Renvoize 2020-02-05 12:31:04 UTC
Created attachment 98461 [details] [review]
Bug 24590: Fix Koha/Object.t on MySQL 8

% prove t/db_dependent/Koha/Object.t
is failing on MySQL 8 with:

 kohadev-koha@9bbf9ac68519:/kohadevbox/koha$ prove t/db_dependent/Koha/Object.t
 t/db_dependent/Koha/Object.t .. 15/18
     #   Failed test 'Exception field is correct'
     #   at t/db_dependent/Koha/Object.t line 650.
     #          got: 'api_keys.secret'
     #     expected: 'secret'
     # Looks like you failed 1 test of 16.
 t/db_dependent/Koha/Object.t .. 16/18
 #   Failed test 'store() tests'
 #   at t/db_dependent/Koha/Object.t line 723.

MySQL 8 displays the tablename in the error.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 3 Martin Renvoize 2020-02-05 12:31:33 UTC
Trivial and obvious fix, Passing QA.
Comment 4 Martin Renvoize 2020-02-05 12:39:12 UTC
Nice work everyone!

Pushed to master for 20.05
Comment 5 Joy Nelson 2020-02-11 00:19:08 UTC
Pushed to 19.11.x branch for 19.11.03
Comment 6 Lucas Gass 2020-03-09 17:19:24 UTC
backported to 19.05.x for 19.05.09