How to make `pact_verifier_cli` fetch and validate...
# general
k
How to make
pact_verifier_cli
fetch and validate only a specific contract for a consumer/provider combination? I've tried using the `--url`parameter, but it still fetches too much. Even with
-c
and
--consumer-version-selectors
it does not do so. As you can see in the screenshots below it should fetch the `9524ab163939ac7ec0f34a9c78485d5734678801`version as er the url, but it fetches more than that.
image (4).png,image (3).png,image (2).png
y
Try removing the
provider-name
argument, I believe this will send a request for any pacts for verification via provider name without consumer version selectors for scoping. You shouldn’t need consumer version selectors at all if you are just verifying a url
k
Tried that but apparently it is a required parameter
image.png
y
ok i think you need --webhook-callback-url
code for source fetching https://github.com/pact-foundation/pact-reference/blob/f5ddf3d353149ae0fb539a1616eeb8544509fdfc/rust/pact_verifier_cli/src/main.rs#L647 url is appended with other selectors, webhook-callback-url short circuits it
k
So you recommend using that instead of just url?
y
to meet your original request,
How to make
pact_verifier_cli
fetch and validate only a specific contract for a consumer/provider combination? I’ve tried using the `--url`parameter, but it still fetches too much.
Yes. I would recommend using that parameter, It is also the recommended setup in client DSL’s, when verifying a pact by a url (usually as a trigger from a webhook event for a contract_requiring_verification_published)
k
Great thank you, will check it out and report back
It seems this argument is not available yet. Was it not released yet/included into pactfoundation/pact-ref-verifier?
This argument seems to be exactly what I need though 😄 👍
y
k
Ah nevermind, I just pulled the image again and got the new version
Now I am actually on 1.1.4
y
great stuff, thanks for confirming 👍