Mikael Giacomini
07/10/2024, 9:39 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Mikael Giacomini
07/10/2024, 12:36 PMMatt (pactflow.io / pact-js / pact-go)
Mikael Giacomini
07/10/2024, 1:53 PMschema. Each interaction has the properties contents and matchingRules, which I can probably leverage to achieve what I need. But how come does the example expects a schema property that I do not get?Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Mikael Giacomini
07/11/2024, 8:27 AMMikael Giacomini
07/11/2024, 8:33 AMMikael Giacomini
07/11/2024, 8:34 AMcontent of the PACT to verify against the golden schema, but I am not sure whether that's a true verification?Matt (pactflow.io / pact-js / pact-go)
--branch flag instead (see also https://docs.pact.io/getting_started/conceptual_overview#branches--environments).
How are you calling the /for-verification endpoint? When you call that, it should accept a number of consumer selectors - these configure how you automatically discover contracts in the broker. My suspicion is finding pacts unrelated to what you need (either for the wrong provider, or it’s not matching a branch or something)
More generally, you should understand the pact workflow (even if you don’t use the Pact SDKs, because the broker enforces and provides the generalised workflow)Mikael Giacomini
07/12/2024, 9:30 AM/pacts/provider/${PROVIDER_NAME}/for-verification ) and I get back only the right pacts I expect. I have not configured consumer selectors at this moment in time but it is fine for testing - we have only one consumer and a few pact published. I was planning to specifically select pacts by passing a body looking like this:
{
"consumerVersionSelectors": [{ "branch": "main"}],
"includePendingStatus": true,
}
As the API does not return me a schema I am actually using the content object of the interaction to compare it against the my golden schema. I am not sure this is the best course of action but that's what I managed to get working for now.
I also managed to successfully publish the results via the pb:publish-verification-results link, however I haven't figured yet how report on each specific interaction rather than failing them allMikael Giacomini
07/12/2024, 10:58 AM[...] however I haven't figured yet how report on each specific interaction rather than failing them allSorted that! I am sending a PUT request to
pb:provider/branches/${branch}/versions/${version} .