Hi team, I'm running into an issue with testing my...
# pact-js
j
Hi team, I'm running into an issue with testing my provider verification locally. I am bringing up my provider api on
localhost:3001
and setting the
providerBaseUrl
to this. But, the trace logs show that the port is randomly assigned. Additionally, I get
Request Failed - error sending request for url (<http://10.75.215.180/>)
during verification. Any ideas what might be going on here?
m
The random port is that pact spins up a proxy to issue requests through (see first line of that screenshot) Not sure about the 10.x.x.x address. What does your hosts file suggest localhost should resolve to?
Same behaviour on another machine?
j
I was able to get the tests to hit localhost by removing
http://
from the
providerBaseUrl
. So this log is showing intended behavior using that port for the proxy? I am not really seeing any meaningful error message beyond the 30 second timeout being exceeded for the test. I confirmed that I am able to hit my intended endpoint at
localhost:3001
and get a 200 response