You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "shreemaan-abhishek (via GitHub)" <gi...@apache.org> on 2026/07/07 12:00:49 UTC
[PR] test(file-logger): cover per-node upstream_unresolved_host mapping [apisix]
shreemaan-abhishek opened a new pull request, #13669:
URL: https://github.com/apache/apisix/pull/13669
### Description
Follow-up test coverage for `upstream_unresolved_host` (added in #13568).
The multi-node test added in #13568 (`file-logger.t` TEST 23/24) uses **two identical `localhost` nodes**. That proves the multi-node `server_picker` branch in `apisix/balancer.lua` runs, but not that `addr_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:
- the domain node logs its hostname (`localhost`),
- the raw-IP node falls back to the ip (`127.0.0.1`).
This validates the per-server `addr_to_domain` mapping and the `res.domain or res.host` fallback. Existing TEST 23/24 are preserved.
Test-only change, no source or schema change.
### Checklist
- [x] I have explained the need for this PR and the problem it solves
- [x] I have explained the changes or the new features added to this PR
- [x] I have added tests corresponding to this change
- [x] I have updated the documentation to reflect this change (N/A, test-only)
- [x] I have verified that this change is backward compatible (test-only)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(file-logger): cover per-node upstream_unresolved_host mapping [apisix]
Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek merged PR #13669:
URL: https://github.com/apache/apisix/pull/13669
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org