test(file-logger): cover per-node upstream_unresolved_host mapping#13669
Merged
shreemaan-abhishek merged 1 commit intoJul 8, 2026
Conversation
The existing multi-node test uses two identical localhost nodes, so it proves the server_picker branch runs but never that addr_to_domain maps the picked server to its own host. Add a mixed domain + raw-IP upstream and assert each node logs its own pre-DNS host (domain resolved, raw IP untouched).
nic-6443
approved these changes
Jul 8, 2026
AlinsRan
approved these changes
Jul 8, 2026
membphis
approved these changes
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Follow-up test coverage for
upstream_unresolved_host(added in #13568).The multi-node test added in #13568 (
file-logger.tTEST 23/24) uses two identicallocalhostnodes. That proves the multi-nodeserver_pickerbranch inapisix/balancer.luaruns, but not thataddr_to_domain[server]maps the picked server to its own host, so a wrong-mapping regression could slip through.Changes
t/plugin/file-logger.t: add TEST 25/26 using a mixed upstream, one domain node (localhost:1980) and one raw-IP node (127.0.0.1:1982). Round-robin visits both across the request cycle; the test collects the pre-DNS host logged for each resolved upstream and asserts:localhost),127.0.0.1).This validates the per-server
addr_to_domainmapping and theres.domain or res.hostfallback. Existing TEST 23/24 are preserved.Test-only change, no source or schema change.
Checklist