Making a separate thread for verification discussi...
# pact-js
t
Making a separate thread for verification discussion @Yousaf Nabi (pactflow.io)
🙌 1
I think a verification is for a unit (the contract)
If you filter that, you can’t publish it
Because you’re not checking whether the provider provides everything the consumer needs
Now, there are SOME interactions that you might be able to live without
For instance, in server-driven contracts, it doesn’t matter if the client actually hits all the endpoints
This is theory, and not how pact works
But it’s related to the issue where sometimes the consumer can deploy without the provider (and pact doesn’t let you do this)
Eg, in message queues, you could deploy safely without the provider being deployed
👍 1
y
Yeah interesting use case. I agree that if you filter the contract contents you aren;’t checking that the provider can provider everything exactly as the customer has specified it, and therefore a verification result here is deemed as full, even though in reality its a partial. Equally, if the provider utilises requestFilters and modifies the request, they potentially augment the consumer request. I wonder if there is a use case for a coverage metric or some way of saying that • x amounts of interactions are tested • x amount havent • x contract was augmented at verification with a can-i-deploy being able to use that as a confidence level.
t
Equally, if the provider utilises requestFilters and modifies the request, they potentially augment the consumer request.
This shouldnt’ be a feature
(in theory)
y
Eg, in message queues, you could deploy safely without the provider being deployed
Yep, so in that scenario depending on the setup, the consumer just emits a message and its never picked up, or it may not be picked up but then sent a DLQ where it could be picked up later
Equally, if the provider utilises requestFilters and modifies the request, they potentially augment the consumer request.
It’s a dangerous footgun
but useful all the same
(I’d probably be jumping through more hoops doing testing in other ways, that I can accept those caveats in my test approach)
but highlighting that they were used, could be valuable for diagnosing, possibly, idk
t
My view is that it just needs per-interaction information: • Needs {provider / consumer} to be present before deployment • This interaction may be optionally verified (which means that it can be missing at verification, but if present it must be working)
And then you roll that information up to the contract level
This is, of course, an alternative model to Pact.
The optional verification could be supported in the verifier
and I think the needs-present thing is probably implementable with the right misuse of the broker API