Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.0 -> main] fix IPv4 vs IPv6 mismatch in gelf_test #2305

Merged
merged 3 commits into from
Mar 15, 2024
Merged

Conversation

spoonincode
Copy link
Member

main merge of #2288

gelf_test.py listens on 127.0.0.1,

leap/tests/gelf_test.py

Lines 71 to 74 in aef4329

def gelfServer(stop):
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.settimeout(1)
s.bind((TestHelper.LOCAL_HOST, GELF_PORT))

but then configured its logging.json to use localhost. In 5.0, gelf will use IPv6 and on by box localhost will resolve to ::1 thus this test would fail locally for me since the gelf messages wouldn't arrive on the expected address.

Explicitly configure 127.0.0.1 in logging.json so it's always IPv4->IPv4

@spoonincode spoonincode merged commit a08ec3e into main Mar 15, 2024
30 checks passed
@spoonincode spoonincode deleted the gelf_localhost branch March 15, 2024 17:14
@ericpassmore
Copy link
Contributor

Note:start
group: STABILITY
category: TEST
summary: Fix tests to use IPv4 for loopback.
Note:end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants