Closed Sokal21 closed 3 years ago
If you are verifying using the Ruby library, you can use rack middleware to do whatever you like with the request. Just be aware of the reduction in confidence when you start modifying requests.
https://docs.pact.io/implementation_guides/ruby/verifying_pacts#modifying-the-request-with-live-data
We want to use pact to use Pact to validate interfaces between our front and back end. Currently we are facing the following issue. Our API is a build as a conjunction of micro services running in kubernetes that leave under the same domain, and there is an ingress that re route request to the different domains base on the request path. For example /lb/payments/{{path}} goes to the payments micro services and /lb/content/{{path}} goes to content. The thing is that when the request is re route that prefix is removed so /lb/payments has no matching route in the code of the payments micro services. Is there a way of rewrite the interaction path when the pacts are being verified?