Search code examples
pact

pact_verifier_cli not honoring consumer-version-selectors


$ pact_verifier_cli -v

pact_verifier_cli 0.8.6
pact verifier version     : v0.8.6
pact specification version: v3.0.0

When I run the following command I get a single pact for verification.

pact_verifier_cli --broker-url <> --provider-name <> --hostname <> --scheme "https" --request-timeout 60000 --consumer-version-selectors "{\"tag\": \"all\",\"latest\": false}"

When I run the following command I get 5 pacts for verification.

curl -s -X POST -H "Content-Type: application/json" -d @pact_consumer_version_selectors.json "<>/pacts/provider/<>/for-verification")

Am I not formatting the parameter correctly? Or is this a known issue? Or am I missing some understanding in logic between these two endpoints?

-- edit -- I have also tried passing garbage as the value for the flag and it still returns the same pact for verification. I am leaning toward this input is ignored as I cannot even get it to fail.


Solution

  • Looks like a bug in 0.8.6 where in order to send the json some sort of authentication is required.
    Adding a dummy --token 1234 mitigates this issue!