[Koha-devel] Building unittests

Wagner, Alexander alexander.wagner at desy.de
Tue Jan 16 12:31:07 CET 2024


Hi!

Currently I work on the migration of our library system to Koha and AFAIS we would like to get bug 29930 into the code. Playing through the test description showed already that the stuff works, so with a little help I already learned the sign-off procedure.

Now, to get the stuff into Koha this module change requires a unit test. Thus I took the plunge into t/db_dependent/Auth_with_ldap.t as recommended and tried to understand what's going on there and how to handle some external dependency (the ldap server that does not exist out there). I also think that I found where I'd have to add the necessary checks for the new code, however I get stuck with actually implementing it.

As far as I understand the code the whole ldap is done via a mockup. Similarly, the borrower is done as a mockup. IOW if I don't miss-understand the code there is no change to kohas internal data and larger parts of the code including the relevant one for #29930 is actually sort of cut short. So I don't really understand how to hook in the new test in such a way, that it actually tests the functionality. I may add that unittests in perl are pretty new to me. The last years I spent mainly doing some small python stuff and I am not a real developer either.

Could someone with more knowledge of Kohas internal probably give me a helping hand there?

-- 
Kind regards,

Alexander Wagner

Deutsches Elektronen-Synchrotron DESY
Library and Documentation

Building 01d Room OG1.444
Notkestr. 85
22607 Hamburg

phone:  +49-40-8998-1758
e-mail: alexander.wagner at desy.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2799 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20240116/4b6db586/attachment.bin>


More information about the Koha-devel mailing list