nats-io / nats.c

A C client for NATS
Apache License 2.0
390 stars 137 forks source link

Fixed test SSLVerifyHostName when build NATS_FORCE_HOST_VERIFICATION=OFF #788

Closed kozlovic closed 2 months ago

kozlovic commented 2 months ago

This test would fail unless we force host verification, so adapt test to take into consideration the expected result based on the build environment variable.

Signed-off-by: Ivan Kozlovic ivan@synadia.com

kozlovic commented 2 months ago

@levb We already have quite a bit of a matrix (even within GA I mean), but do you think we need to have a new one to test with the force_host_verification disabled? It is enabled by default and I would want the lib to be like that by default, but yeah, building with it disabled showed that I did not account for that originally in that test.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 70.65%. Comparing base (1553d4a) to head (b87fdca). Report is 11 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #788 +/- ## ========================================== + Coverage 68.71% 70.65% +1.94% ========================================== Files 39 47 +8 Lines 15207 15136 -71 Branches 3143 3090 -53 ========================================== + Hits 10449 10694 +245 + Misses 1700 1458 -242 + Partials 3058 2984 -74 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

levb commented 2 months ago

@kozlovic I am now looking at the https://github.com/nats-io/nats.c/actions/runs/10322972901/job/28579373546?pr=788 failure, will send a separate PR for it, ~seems another test (args race) issue~