[Koha-bugs] [Bug 35904] C4::Auth::checkauth cannot be tested easily

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Feb 15 05:17:55 CET 2024


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

Victor Grousset/tuxayo <victor at tuxayo.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |victor at tuxayo.net

--- Comment #10 from Victor Grousset/tuxayo <victor at tuxayo.net> ---
(In reply to Marcel de Rooy from comment #5)
> Since Auth is already a problem, why make it worse with convenience parameters for
> testing only? Could we address the lengthy tests in the .t itself?

The two simple conditions added in Auth.pm are not really making anything worse
IMHO. And the cleanup that it allows in the tests is definitely making things
better there.
For code readability and maintainability, the tests should be 1st class
citizen. (at least just for readability and maintainability)


I wonder if the new optional param do_not_print couldn't have a better name
though? That either reflects better that it's for tests or that it disables the
web response and just returns the template variables instead.

no_http_response_and_return_template?
test_disable_http_response?

If that doesn't do it and no better comes, at least at the declaration of
`params` there could be that do_not_print is for testing facilitation.


Meanwhile here is a second signoff
- basic manual testing works
- Auth.t & selenium/authentication_2fa.t & selenium/authentication.t
- change makes sense
- code looks good
- QA script happy

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


More information about the Koha-bugs mailing list