Closed canny[bot] closed 3 weeks ago
This issue has been linked to a Canny post: Support running a single interaction when verifying a pact :tada:
The equivalent behaviour has been implemented in the rust shared core, exposed via environment variables, as per the pact-ruby implementation - user facing docs here
Interactions can be filtered via the CLI
Filtering interactions:
--filter-description <filter-description>
Only validate interactions whose descriptions match this filter (regex format) [env: PACT_DESCRIPTION=]
--filter-state <filter-state>
Only validate interactions whose provider states match this filter (regex format) [env: PACT_PROVIDER_STATE=]
--filter-no-state
Only validate interactions that have no defined provider state [env: PACT_PROVIDER_NO_STATE=]
-c, --filter-consumer <filter-consumer>
Consumer name to filter the pacts to be verified (can be repeated)
They can be controlled externally when using libpact_ffi consumed in other languages by env vars
PACT_DESCRIPTION
PACT_PROVIDER_STATE
PACT_PROVIDER_NO_STATE
The pact ruby implementation allows the user to replay a single interaction from a pact at a time. This makes it much easier to fix failing interactions as pacts can get quite large, and there can be a lot of noise when reporting the failure of every interaction at once. The pact ruby implementation is being replaced by the pact rust shared core, which does not yet support this feature. I think we should work out how we could add support for it. The interactionId field that is added by the Pact Broker is suitable for this purpose.
It is possible that this might be best implemented as a Pact Broker feature by passing through another parameter in the 'pacts for verification' call.
https://pact.canny.io/admin/board/feature-requests/p/support-running-a-single-interaction-when-verifying-a-pact