Open jarmy opened 3 years ago
I'm not able to replicate this. See my test project here: https://github.com/uglyog/pact-lein-test
In that project, I started the broker using docker-compose, published your pact to it, and the ran the verify and it worked as expected.
$ lein with-profile pact pact-verify
Verifying a pact between :consumer1 and :provider1
[from URL http://localhost:9292/pacts/provider/sod/consumer/graphql/version/1.0.3]
POST request for search on demand results
Request Failed - Connect to localhost:5050 [localhost/127.0.0.1] failed: Connection refused (Connection refused)
NOTE: Skipping publishing of verification results as it has been disabled (pact.verifier.publishResults is not 'true')
Failures:
1) Verifying a pact between :consumer1 and :provider1 - POST request for search on demand results
1.1) Connect to localhost:5050 [localhost/127.0.0.1] failed: Connection refused (Connection refused)
Note that I've given the full URL to the Pact file in the broker.
Oh, I see the issue. You're pointing to the root of the broker. Let me add support for that.
I'm trying to enable this for you, but I need to enable debug logs with Leiningen. I can't work out how to do this.
You will have to use the full URL to the Pact in the broker.
Aha, very nice! I was able to get the test to run using :pact-source "https://pact-broker.docker.savagebeast.com/pacts/provider/sod/consumer/graphql/latest"
./lein with-profile pact pact-verify
Verifying a pact between :graphql and :sod
[from URL https://pact-broker.docker.savagebeast.com/pacts/provider/sod/consumer/graphql/latest]
POST request for search on demand results
returns a response which
has status code 200 (OK)
has a matching body (OK)
I have a pact that is using pact-specification 2.0 that I'm trying to verify with the
au.com.dius.pact.provider/lein "4.1.20"
plugin. When we run thepact-verify
task, we get the following message:Here's the clojure/lein definition:
And the pact file we're trying to verify: