Pact Go enables consumer driven contract testing, providing a mock service and DSL for the consumer project, interaction playback and verification for the service provider project.
Questions tagged [pact-go]
5 questions
1
vote
1 answer
Pact consumer test in Go. Issue with dsl.Match function
I am writing a Pact consumer test in Go. When I define the interaction I need to add the expected response object. The provider service is written in PHP and this is the response I am expecting:
return [
'status' => 'success',
…

KarlsMaranjs
- 311
- 1
- 9
0
votes
1 answer
pact go contract testing - should I mock business logic
I'm researching Pact contract testing and I've got a question whether the business logic should be mocked during this test.
Let's say I have an endpoint
POST /user
{
"name": "first name"
"accountID": "12345678"
}
Assume I've written the…

Marijus
- 4,195
- 15
- 52
- 87
0
votes
1 answer
Running Pact provider tests against deployed HTTPS provider
I want to set up Pact contract testing for my clients and APIs. My APIs cannot be run locally, so I want to be able to run provider tests against deployed staging version of the API before deploying to production.
Most examples I've seen online of…

maaland
- 437
- 1
- 4
- 14
0
votes
1 answer
Provider Not Registering Interaction
I'm using the Pact Go implementation to try out contract testing. I've made a provider test that isn't working because I need to mock out my service's request to Twilio.
I've made one Pact object for the contract between my consumer and this…

Alex Haynes
- 322
- 3
- 16
-1
votes
1 answer
Pact-Go cannot find the server is running
I'm trying to create a simple consumer-provider contract with Pact and Pact Broker.
The consumer is working and it's publishing the interactions to the broker as expected, but the provider is failing to when running the tests.
The error is:
---…

Lucas Beier
- 621
- 1
- 7
- 19