Provider branch not sent to Pact Broker in consumer version selectors if enablePending=false #1769
Labels
bug
Indicates an unexpected problem or unintended behavior
smartbear-supported
SmartBear engineering team will support this issue. See https://docs.pact.io/help/smartbear
If
enablePending = false
, the current provider branch name is NOT sent to the Pact Broker when fetching pacts to verify using consumer version selectors.Because of that e.g. the
matchingBranch()
selector doesn't work, because the request sent to the Pact Broker doesn't contain which branch is the one to match:Java code:
Request made to the Pact Broker by the Pact JVM library:
This results in the Pact Broker returning 400 Bad Request:
Cause of the issue
The branch name is sent only if
enablePending = true
. The piece of code responsible for that inPactBrokerClient.kt
:Why do I consider it a bug?
Using
matchingBranch()
withenablePending = false
seems completely reasonable and the docs seem to confirm that:The text was updated successfully, but these errors were encountered: