fluent-logger-python icon indicating copy to clipboard operation
fluent-logger-python copied to clipboard

Add test for IPv6 functionality

Open mcipperly opened this issue 4 years ago • 4 comments

I wrote a test for PR #138 which adds IPv6 support ( #137 )

mcipperly avatar Apr 21 '21 17:04 mcipperly

Coverage Status

Coverage decreased (-0.8%) to 99.215% when pulling a1017fa8064885733ac7db759bc7fa4a808fdce3 on mcipperly:ipv6test into ace80f4c2bd0020fc16891440243663c612dd01e on fluent:master.

coveralls avatar Apr 21 '21 18:04 coveralls

Apologies for the spam, my git is rusty and I haven't built on another PR previously!

Travis doesn't seem to support IPv6 (more info here and here ) so I did add a condition to skip in that case. Unfortunately this causes the IPv6 code to still not be covered through CI testing infrastructure - open to thoughts on how to address if this isn't workable.

mcipperly avatar Apr 21 '21 18:04 mcipperly

@mcipperly could you rebase tihis pull request?

kenhys avatar Apr 22 '21 03:04 kenhys

Updated to address the above re: not wanting to determine v4/v6 capability each time. Now:

  • When we connect, save address family
  • If we fail to connect in the future, reset address family and try to figure it out again - this could address issues in long-running applications where the target fluent system loses its IPv4 or IPv6 address during runtime

Also added the prefer_ipv6 option which can be set to True to prefer IPv6 and fall back to IPv4

mcipperly avatar May 11 '21 22:05 mcipperly