Hi all, I would like to use WireMock to test clien...
# help
i
Hi all, I would like to use WireMock to test client DNS resolution logic and how sequential requests are issues based on the configured SRV and A/AAAA records if previous endpoints failed. 1. I understand that WireMock Standalone Docker image listens on all interfaces on a fixed port. Is that right? If not, how can I tell WireMock to listen on multiple IPs? 2. Once WireMock has received the request, how can I check which interface it arrived on? I've seen some documentation regarding hostname validation, but I think in my case hostname will be the same as long as A/AAAA records from the same DNS response are used. Thanks in advance for any help/pointers.
t
You can bind WireMock to one specific interface if you need to, and you can’t get at the server IP address within WireMock’s model unfortunately so the only way I can think of to do this is run two instances, one on each adapter/IP then have your tests query both after each test to determine which one received the request.
i
Thanks for the answer. We're currently testing a workaround with an Nginx proxy in front of the WireMock that adds custom HTTP headers with the local IP address on which Nginx receives the request. Looks promising so far.
👍 1