yep, the verifier spins up a proxy locally which a...
# pact-go
m
yep, the verifier spins up a proxy locally which all requests are sent to. This allows some features like provider states to be mapped to go functions, logging etc.
b
But what about the error that I got, Is this return expected? How can I redirect the proxy to my starterServer() which I am mocking my response? I simply followed the example like TestV3HTTPProvider test, and when I tried to run this test I got no tests to run in
TestConsumerV3
and
TestV3HTTPProvider
.
m
Can you please share the file you’re trying to run?
Note these build tags at the top: https://github.com/pact-foundation/pact-go/blob/master/examples/consumer_v3_test.go#L1 If you don’t specify them in the test command, they’ll be ignored
so
go test -tags consumer TestConsumerV3
for the consumer and
-tags provider
for the provider
(or remove tags if you don’t need them)
b
It is the _consumer_v3_test.go_ and _provider_test.go_ in the examples folder. I'm going to try this way ✌️
But in my example writing the
TestProductAPIProvider
to validate the
TestProductAPIClient
from basic_test.go in the examples folder, Do I need to setup the build like the other examples? Or is it something that I am missing? https://pact-foundation.slack.com/archives/C9UTHTFFB/p1705533277803099