Hi. Just after some general advice. When verifying...
# general
m
Hi. Just after some general advice. When verifying the contracts via the provider, I am running localhost [as per the example](https://github.com/pact-foundation/pact-php/blob/master/example/tests/Provider/PactVerifyTest.php#L27). However, I have now realised this means that any downstream services the provider calls might have to either be mocked or reachable in some other way. One way around this would be to call the provider on a testing environment, where all the services are running. That way, I won’t have to mock anything downstream, because it’ll already be there running (probably). Or should I really be in the habit of mocking these downstream services anyway? Is there an appropriate alternative? Such as not running the provider service but instead verifying the contracts against a spec for the provider… and just assuming that the provider and the spec for the provider are in sync? To be honest, I don’t know if I like the sound of that even if that is an option.
👋 1
m
In short, stubbing downstream systems is the way to go usually
You want to try and think of pact tests as unit tests, as much as you can. This should get you into the right frame of mind to answer a lot of these types of questions
m
Yes. I have just read the "GOLDEN RULE" on writing consumer tests and that has helped my understanding 🙂
🙌 1