rpm-software-management / librepo

A library providing C and Python (libcURL like) API for downloading packages and linux repository metadata in rpm-md format
http://rpm-software-management.github.io/librepo/
GNU Lesser General Public License v2.1
74 stars 91 forks source link

tests: Adapt to CURL without NTLM support #320

Closed ppisar closed 2 months ago

ppisar commented 2 months ago

If CURL is built without NTLM support (e.g. if libcurl-minimal RPM package is installed instead of libcurl on Fedora), tests/test_handle.c failed:

/home/test/librepo/tests/test_handle.c:61:F:Main:test_handle:0: Assertion 'lr_handle_setopt(h, ((void *)0), LRO_HTTPAUTHMETHODS, LR_AUTH_NTLM)' failed

The cause is that the test exhibing NTLM authentication also checks that lr_handle_setopt() succeeds.

This patch stops checking a return value of lr_handle_setopt() in case of LR_AUTH_NTLM because a meaning of the test is checking for memory leaks.

ppisar commented 2 months ago

I also corrected a python test.