Bug 39214

Summary: Mock preferences in t/db_dependent/Koha/Session.t for subtest 'test session driver'
Product: Koha Reporter: Kyle M Hall (khall) <kyle>
Component: Architecture, internals, and plumbingAssignee: Kyle M Hall (khall) <kyle>
Status: Pushed to main --- QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: tomascohen
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:
Attachments: Bug 39214: Mock preferences in t/db_dependent/Koha/Session.t for subtest 'test session driver'
Bug 39214: Mock preferences in t/db_dependent/Koha/Session.t for subtest 'test session driver'

Description Kyle M Hall (khall) 2025-02-28 10:57:39 UTC
The "test session driver" unit test assume SessionStorage is set to MySQL and will fail if it is set to anything else. We should mock the values, and test the other supported values.
Comment 1 Kyle M Hall (khall) 2025-02-28 11:00:00 UTC
Created attachment 178816 [details] [review]
Bug 39214: Mock preferences in t/db_dependent/Koha/Session.t for subtest 'test session driver'

The "test session driver" unit test assume SessionStorage is set to MySQL and will fail if it is set to anything else. We should mock the values, and test the other supported values.

Test Plan:
1) Set SessionStorage to File
2) prove t/db_dependent/Koha/Session.t
3) Note test failure
4) prove t/db_dependent/Koha/Session.t
5) Tests pass!
Comment 2 Tomás Cohen Arazi (tcohen) 2025-02-28 13:31:32 UTC
Created attachment 178821 [details] [review]
Bug 39214: Mock preferences in t/db_dependent/Koha/Session.t for subtest 'test session driver'

The "test session driver" unit test assume SessionStorage is set to MySQL and will fail if it is set to anything else. We should mock the values, and test the other supported values.

Test Plan:
1) Set SessionStorage to File
2) prove t/db_dependent/Koha/Session.t
3) Note test failure
4) prove t/db_dependent/Koha/Session.t
5) Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 3 Tomás Cohen Arazi (tcohen) 2025-02-28 13:32:48 UTC
New tests are added. Tests pass, I reproduced the failure.
Comment 4 Katrin Fischer 2025-02-28 16:42:34 UTC
Pushed for 25.05!

Well done everyone, thank you!